-
Notifications
You must be signed in to change notification settings - Fork 432
error TS2339: Property 'propMessage' does not exist on type 'App'. #44
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
Comments
Hi, the example in README is for Babel. @ktsn should we change the documentation, for example adding one comment line of declaration in class body, to indicate this? (Though IMHO TS users should already know that.) |
Adding |
class App extends Vue {
// initial data
msg = 123
// you need manually add props in TypeScript, like below
// propMessage: string
// use prop values for initial data
helloMsg = 'Hello, ' + this.propMessage
} |
Hmm, I'm unwilling to add the comment because it is the description of TypeScript rather than vue-class-component. |
Sounds good to me! 👍 |
Execute README example code, and get this error message.
It seems cannot understand variables defined in Component
props
section.Develop Environment:
The text was updated successfully, but these errors were encountered: