-
Notifications
You must be signed in to change notification settings - Fork 156
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
support intl.get(key) type check #83
Conversation
Change-Id: I66f70281e5f074cc83204e4aff64cf05c57265a2
fix issue #82 it now supports checks the value pass to intl.get(key) ,key is valid if it's translation's key. |
@cwtuan Can we merge? i love this <3 |
I still love this and would still love to see it merged! |
This PR makes existing project shows error if they doesn't have the definition file. This also force users to enable the ts type checking even if they don't want this feature. |
@cwtuan , Yes, It's a breaking change, and I think It's impossible to implement key check without introducing breaking change, and the fixing is easy for old project.
|
Yes, we could ask user to add that declaration, but it may introduce more difficulty to newcomer. |
@cwtuan Yes, we could disable this feature by default by using generic parameter default
in which key type check is disabled unless you pass type to generic |
Maybe we could add another .get function signature or get function? Like getSafely? |
@jhaenchen |
Change-Id: I66f70281e5f074cc83204e4aff64cf05c57265a2