Bug: react-jsxdev support for add all missing imports
#41920
Labels
Bug
A bug in TypeScript
Domain: JSX/TSX
Relates to the JSX parser and emitter
Domain: Quick Fixes
Editor-provided fixes, often called code actions.
Effort: Moderate
Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
Help Wanted
You can do this
Milestone
Steps to Reproduce:
1.
mkdir vscode-react-import && cd vscode-react-import
2.
yarn add react @types/react typescript
3. modify files as bellow
tsconfig.json
.vscode/settings.json
foo.tsx
bar.tsx
4.Select TypeScript version, Use workspace version 4.1.2


5. Move cursor to Foo, see error
Cannot find name 'Foo'.ts(2304)
6. type
⌘
+.
7. Add all missing imports, then result:
⌘
+.
We should not add
import * as React from "react";
when tsconfig has"jsx": "react-jsxdev"
or"jsx": "react-jsx"
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: