-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Tagged enum inference with string literal types isn't sophisticated enough #20
Comments
This is an interesting use of string types. Will try supporting it. Basically it may boil down to us not being sensitive to === with string types, in which case the fix should be easy. |
Curious: what's the intended use of string types? |
Method overloading is the reason I most often hear. Like this example from the TypeScript Language Spec
|
+1 for this |
I've been thinking about this issue and I think I have an idea for how to implement this. When That doesn't help us if the I know that implementation is pretty wild (string manipulation! yuck!) and its incompleteness is pretty lame too. Worth doing? Is there a better way? |
@spicyj Finally got around to fixing this, motivated by real-world use cases. We can now write ML in JS! ;) |
Sweeet. |
Fixed in 0.13! |
@samwgoldman Thanks! Any plans for blog article with examples from the team? |
Blog post coming soon. On Tuesday, June 30, 2015, Ingvar Stepanyan notifications@github.com
|
Thanks! |
Add friendlier error for two adjacent elements
Ideally this would type-check
but it gives
(Let me know if I'm just misunderstanding how string types work.)
The text was updated successfully, but these errors were encountered: