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
In order to enforce specific type usage for my React components I'd like to output unique typings with the library.
For context, I use typed-scss-modules to output types for some of the re-usable values declared in SCSS. And the idea would be to enforce my component props use those specifically. Doing so would also enable completions for most IDE when completing said props.
Since outputting enums would be a bit more work and since they are a more controversial option, how about having the possibility to output unique symbols rather than plain strings through options?
interesting, i haven't seen this approach used for unique typings before
conceptually, i like the idea and understand what you're going for. from a maintenance standpoint, i'm on the fence if i'd want this code to live in the library and need to maintain it.
what if this class name to type def function was exposed as a config option that could override the default? this way when the next person wants to customize the type output we don't need to add another configuration and more code, or if TypeScript it's proper support for unique types with this hack then this library wouldn't need to change.
In order to enforce specific type usage for my React components I'd like to output unique typings with the library.
For context, I use
typed-scss-modules
to output types for some of the re-usable values declared in SCSS. And the idea would be to enforce my component props use those specifically. Doing so would also enable completions for most IDE when completing said props.Since outputting
enum
s would be a bit more work and since they are a more controversial option, how about having the possibility to output unique symbols rather than plainstring
s through options?The text was updated successfully, but these errors were encountered: