Skip to content

fix wrapping classes when targeting ESNext #38566

New issue

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

Closed
wants to merge 1 commit into from

Conversation

clydin
Copy link
Contributor

@clydin clydin commented May 14, 2020

This conforms to the behavior present in the class fields transformer:

function transformSourceFile(node: SourceFile) {
const options = context.getCompilerOptions();
if (node.isDeclarationFile
|| options.useDefineForClassFields && options.target === ScriptTarget.ESNext) {
return node;
}

Fixes #38528

@RyanCavanaugh RyanCavanaugh requested a review from rbuckton May 14, 2020 15:15
@sandersn sandersn added the For Milestone Bug PRs that fix a bug with a specific milestone label May 20, 2020
@clydin clydin force-pushed the fix-class-iife-esnext branch from 710136b to 303beba Compare May 20, 2020 22:50
@clydin clydin closed this May 22, 2020
@clydin clydin deleted the fix-class-iife-esnext branch August 20, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Static field emit is IIFE
4 participants