Skip to content

Conversation

@amcasey
Copy link
Member

@amcasey amcasey commented May 22, 2018

...based on feedback from VS Code users.

Fixes #23287

@amcasey amcasey requested a review from mhegazy May 22, 2018 01:11
const typeChecker = program.getTypeChecker();
const jsxNamespace = typeChecker.getJsxNamespace();
const jsxContext = sourceFile.languageVariant === LanguageVariant.JSX && program.getCompilerOptions().jsx;
const jsxContext = sourceFile.languageVariant === LanguageVariant.JSX;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wounder if a better check here is sourceFile.transformFlags & TransformFlags.ContainsJsx !== 0.. this way we only keep it if we know at least one JSX element exist..

@amcasey amcasey changed the title Preserver jsx imports even when the compiler option is not set Preserve jsx imports even when the compiler option is not set May 22, 2018
@amcasey amcasey merged commit bedc110 into microsoft:master May 22, 2018
@amcasey amcasey deleted the GH23287 branch May 22, 2018 18:23
@mhegazy mhegazy mentioned this pull request May 22, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants