Closed
Description
TypeScript Version: 2.4.0-dev.20170429
Code
export function render() {
const foo = 'foo'; // Gives error when noUnusedLocals are enabled.
// foo is used here, but the compiler doesn't "see" it
return <div {...{} as any}>{foo}</div>;
}
Expected behavior:
Since foo
is used it should compile properly.
Actual behavior:
'foo' is declared but never used.