Open beselig opened 1 week ago
Sounds reasonable, but our Form
types are actually runtime types and not a typescript interface so it may have some differences when Vue's compiler attempts to reverse generate the runtime types, for example you lose the defaults then.
It might be possible to expose as an object rather than a type.
Is your feature request related to a problem? I am building a component library in which I am implementing pre-styled wrappers for
Field
andForm
components.I expected that I would be able to import the type of the
Form
component's props, so that I could just do this:For the
Field
component, I am aware that I can build a custom input myself, usingdefineField
and such, to do exactly whatField
does under the hood. But forForm
I am sure that it would not be feasible. Even forField
I don't see why I should have to do that.If someone can point me to another way of achieving what I am trying to achieve, or tell me why what I am doing should be avoided or there is a simpler way and I am overengineering this, feel free to call me on my bs. š
Otherwise I guess the obvious solution is to add an
export
infront of the Prop type declarations inside componentsForm
,Field
and other customizable components. After glancing over the implementations, I believe that should do the trick.Hope all this makes sense or someone can tell my why it doesn't. Cheers šš¼