We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: 2.3.1
Code
// hello.tsx import * as React from 'react'; export class SelectInput extends React.Component<any,any> { render() { let cls = 'hello'; return (<select {...this.props} className={cls}>{this.props.children}</select>); } }
package.json:
package.json
{ "dependencies": { "@types/react": "^15.0.24", "react": "^15.5.4", "typescript": "2.3.1" } }
Expected behavior:
I expect the compiler to think that cls was used.
cls
Actual behavior:
The compiler emits this error:
$ tsc --jsx react --noUnusedLocals hello.tsx hello.tsx(5,9): error TS6133: 'cls' is declared but never used.
The text was updated successfully, but these errors were encountered:
I should mention, I'm not sure if it's the same or different than:
Sorry, something went wrong.
Duplicate of #15478, should be fixed in TS 2.3.3.
The fix should be in typescript@next already, give it a try and let us know if you are still running into issues.
typescript@next
No branches or pull requests
TypeScript Version: 2.3.1
Code
package.json
:Expected behavior:
I expect the compiler to think that
cls
was used.Actual behavior:
The compiler emits this error:
The text was updated successfully, but these errors were encountered: