Created
November 7, 2021 07:58
-
-
Save NWYLZW/d095ebaadb0e223d18ddb8921324efb3 to your computer and use it in GitHub Desktop.
shims for vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'vue-router' | |
declare module 'vue-router' { | |
interface RouteMeta { | |
title: string | |
need?: { | |
groups?: string[] | |
} | |
icon?: NodeRequire, | |
activeIcon?: NodeRequire | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '*.vue' { | |
import type { DefineComponent } from 'vue' | |
const component: DefineComponent<{}, {}, any> | |
export default component | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Store } from 'vuex' | |
import { State as UserState } from '@/store/modules/user' | |
declare module '@vue/runtime-core' { | |
interface State { | |
user: UserState | |
} | |
interface ComponentCustomProperties { | |
$store: Store<State> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment