-
Notifications
You must be signed in to change notification settings - Fork 102
feat: TypeScript support #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
60df66f
bbf4f9c
549eea1
ef8ecb9
9c917ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import * as VueJS from 'vue' | ||
|
||
declare function wrap( | ||
Vue: VueJS.default, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the above, I think that it will be below using Vue: typeof _Vue |
||
Component: VueJS.VueConstructor<VueJS.default> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Considering the asynchronous component, i think we should be defined the below. ComponentOptions<Vue> | typeof Vue | AsyncComponent ref: vue-router There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
): HTMLElement | ||
|
||
export default wrap |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"noEmit": true, | ||
"lib": [ | ||
"es2015", | ||
"dom" | ||
] | ||
}, | ||
"include": [ | ||
"./*.ts" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To adjust to the type definitions of other libraries, I think that we should be directly import rather than
as
using.ref: vuex https://github.com/vuejs/vuex/blob/dev/types/index.d.ts#L1