-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
typing defineComponent props #3796
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
You might want to open a PR. But you will need to explain yourself (in English) Ines off just post pictures |
@posva I added some background information |
@posva @pikax The type of import { defineComponent } from 'vue';
const Component1 = {
props: {
foo: String,
},
};
const Component2 = defineComponent(Component1);
Component1.props; // --> { foo: StringConstructor }
Component2.props; // --> any |
#5416 introduced a regression because it changed the argument order of We need to find a way to do it while preserving the current argument order of |
There must be a way to send type, attrs only takes data, but if we define interface, at least volar can collect both props and attrs types. This feature opens it to libraries like the read-ui. Couldn't it be easy to send attrs an interface or type as we can write props in a simple way? |
Version
3.0.11
Reproduction link
youzan/vant#8701
Steps to reproduce
What is expected?
What is actually happening?
The text was updated successfully, but these errors were encountered: