You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add configuration to generate type alias instead of interface for props? Like this: type ComponentProps = {} instead of interface ComponentProps {}
The text was updated successfully, but these errors were encountered:
escapade1990
changed the title
Add support for types
Add support for types label:enhancement
Dec 27, 2021
escapade1990
changed the title
Add support for types label:enhancement
Add support for types
Dec 27, 2021
Hi!
See #41. This feature will be implemented in v1.4.0, but it's already out as an unstable version.
As I commented there:
Ok, it's implemented in version 1.4.0-alpha.1. You can install it using npm i -g agrippa@1.4.0-alpha.1, please test it out!
The new flag is tsPropsDeclaration (--ts-props-declaration in the command line), and it can receive either interface (the default) or type; the corresponding Typescript structure is then used. Note that using this flag in a non-TS environment will raise an error.
It's technically an unstable version, but the tests I set up for the feature pass and it seems to behave smoothly. Either way, if you come across any bugs or have any other feedback, please reply here!
Is it possible to add configuration to generate type alias instead of interface for props? Like this:
type ComponentProps = {}
instead ofinterface ComponentProps {}
The text was updated successfully, but these errors were encountered: