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
Extension not recognizing props attributes inside setup method #2849
Comments
Please see this warning. |
Hey @yoyo930021 I´ve changed my props to use the following setup: export default defineComponent({
name: 'my-button',
props: {
label: {
type: String as PropType<String>,
required: true,
},
primary: {
type: Boolean as PropType<Boolean>,
default: false,
},
size: {
type: String as PropType<String>,
validator: function (value: string): boolean {
return ['small', 'medium', 'large'].indexOf(value) !== -1;
},
},
backgroundColor: {
type: String as PropType<String>,
},
}
} But I´m still seeing the same issue. |
The warning say using arrow function or |
@yoyo930021 would mind to add more details? Not sure if I get it right. |
{
validator: (value: string) => {
return ['small', 'medium', 'large'].indexOf(value) !== -1;
},
} |
Vetur: Restart VLS
Info
Problem
I´m trying to use
storybook
along withvue
andtypescript
. All linter, builds and tests are working fine, but when openingButton.vue
file on my IDE it says:Property 'primary' does not exist on type 'Readonly<{ [x: number]: string; }
Component:
Reproducible Case
I was following this tutorial
You can find the source right here in Gitlab.
The text was updated successfully, but these errors were encountered: