-
Notifications
You must be signed in to change notification settings - Fork 343
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
fix: defineComponent() with array props #364
Conversation
Tests passed on my machine but failed on Github Actions. I guess it's because it uses npm without package-lock.json, which may cause dependencies inconsistency. Hold to see if the error still persists after #347 gets merged. |
Passed with ts |
Updated to |
@pikax it's might due to that I have moved the array overload in front of the object one. And yes, it would be great if you can help out :) |
Replace type DefaultFactory<T> = () => T | null | undefined;
interface PropOptions<T = any> {
type?: PropType<T> | true | null;
required?: boolean;
default?: T | DefaultFactory<T> | null | undefined;
validator?(value: unknown): boolean;
} |
It works. Thanks! |
This continues #150, as it's kinda out-of-date. The type declarations are ported from vue-next.
Before
After