Skip to content
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

Use typescript classes as vue components #9

Closed
OriginalYellow opened this issue Nov 28, 2018 · 1 comment
Closed

Use typescript classes as vue components #9

OriginalYellow opened this issue Nov 28, 2018 · 1 comment
Labels

Comments

@OriginalYellow
Copy link
Owner

OriginalYellow commented Nov 28, 2018

Resources:
all-encompassing guide on how to do this
vue-property-decorator docs
vue-class-component docs - doesn't really cover typescript

@OriginalYellow
Copy link
Owner Author

OriginalYellow commented Nov 28, 2018

You need to change this:

@Prop({default: 'Example'})
exampleProp: string;

to this:

@Prop({default: 'Example'})
exampleProp!: string;

adding an exclamation point to the end of "exampleProp" to silence the compiler.

Source: kaorun343/vue-property-decorator#81

OriginalYellow pushed a commit that referenced this issue Nov 28, 2018
OriginalYellow pushed a commit that referenced this issue Dec 6, 2018
OriginalYellow pushed a commit that referenced this issue Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant