-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Description
// ./tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"noEmit": true,
}
}// ./src/index.tsx
declare var Foo: any;
let x = <Foo></Foo>;[4:24:35 PM] Starting compilation in watch mode...
src/index.tsx:3:9 - error TS17004: Cannot use JSX unless the '--jsx' flag is provided.
3 let x = <Foo></Foo>;
~~~~~
[4:24:37 PM] Found 1 error. Watching for file changes.
Now add "jsx": "react", to the tsconfig.json.
{
"compilerOptions": {
+ "jsx": "react",
"target": "esnext",
"module": "commonjs",
"noEmit": true,
}
}Expected: Error should be gone.
Actual: Error is still present.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript