Why cannot Props type be imported from external file? #6737
martinszeltins
started this conversation in
General Discussions
Replies: 2 comments 2 replies
-
This is planned for 3.3 according to https://youtu.be/3QPp_DlcZpM?t=889. As a workaround, have you considered defining your types in a d.ts file to make them globally available? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Vue 3 currently it is impossible to import Prop type from an external file. But this causes me to duplicate prop type in 2 places which is not DRY. Will this be possible in 3.3?
Right now I need to do this (you can see that I need to duplicate prop definition twice):
Component:
fileProps.ts:
Composable:
Beta Was this translation helpful? Give feedback.
All reactions