Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(typings): were not implemented correctly#289

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rigor789 merged 2 commits intonativescript-vue:masterfromTronix117:hotfix/typings
Aug 1, 2018

Conversation

Tronix117
Copy link
Contributor

@Tronix117Tronix117 commentedJul 26, 2018
edited
Loading

Typings should not declare a module wereas they are already in the concerned module
Also, reusing Vue way of doing typings, and separating constructor from body to have better overriding capabilities


$refs generic types

importVuefrom'nativescript-vue'import{RadSideDrawer}from'nativescript-ui-sidedrawer'import{Component}from'components/decorator'@Component({})classTestComponentextendsVue{$refs:{drawer:Vue<RadSideDrawer>mainContent:Vue<StackLayout>drawerContent:Vue<StackLayout>,}mounted(){// `drawerView` will be of type RadSideDrawerconstdrawerView=this.$refs.drawer.nativeView}}

Vue augmentation

You can augment the same way you are augmenting with Vue:

importVuefrom'vue'import{Bus}from'store/bus'import*asmomentfrom'moment'import{VueConstructor}from'vue/types/vue'import{Size}from'tns-core-modules/ui/frame/frame'importComponentsfrom'components'import*ashttpfrom'http'exportinterfaceVueDevice{screen:Sizecontent:SizeactionBar:SizenavBar:SizestatusBar:Sizekeyboard:Size}declare module'vue/types/vue'{interfaceVue{$http:typeofhttp,$bus:Bus$moment:typeofmoment$device:VueDevice}interfaceVueConstructor{bus:Busdevice:VueDevicemoment:typeofmoment}}

Tronix117and others added2 commitsJuly 26, 2018 18:18
Typings should not declare a module wereas they are already in the concerned moduleReusing Vue way of doing typings, and separating constructor from body to have better overriding capabilities
@rigor789rigor789 merged commitbb265bd intonativescript-vue:masterAug 1, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Tronix117@rigor789

[8]ページ先頭

©2009-2025 Movatter.jp