Skip to content
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

Typings for typescript #2

Closed
shiro opened this issue Sep 4, 2018 · 1 comment
Closed

Typings for typescript #2

shiro opened this issue Sep 4, 2018 · 1 comment

Comments

@shiro
Copy link
Contributor

shiro commented Sep 4, 2018

Typescript is often used with react and provides strong type checks at compile-time.

At the moment there are no typings for css-modules-theme.
Perhaps someone with more TS experience could work on this as I'm not used to it yet.

edit
I've tried to write some typings for this, although as it seems this completely destroys type safety, since it's impossible to determine the type of the theme props as it depends on the themePrefix prop.

At this time it is impossible to augment string literal types in TS (microsoft/TypeScript#12754).

@klimashkin
Copy link
Owner

Version 2.0.0 has been rewritten using TypeScript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants