-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
TSX variable element #8549
Comments
Another: const t = {tag:'h1'}
const foo = <t.tag/>
I guess its valid to tag if the variable resolves to a WarningBut not if its not const tag ='h1';
const foo = <tag/> is actually creating a TypeNote : The type will probably have to resolve to |
@sandersn could i take this bug ? |
Sure, I haven't looked at it at all. |
Update on the decision we made, after talk with @RyanCavanaugh about this. We made following decision:
So in both examples pointed out by @RylanH and @basarat , the type will be anyType and no error should be reported. if you would like a tighter check, you will want to give it a string literal type |
TypeScript Version:
1.8.10
Code
Expected behavior:
No error
Actual behavior:
Throws compilation error 'Cannot find name this'
Workaround
The text was updated successfully, but these errors were encountered: