diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 0b8f59a82ef..35844095da4 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3160,8 +3160,8 @@ namespace ts { if (subtreeFlags & TransformFlags.ContainsSpreadExpression) { // If an ObjectLiteralExpression contains a spread element, then it - // is an ES experimental node. - transformFlags |= TransformFlags.AssertExperimental; + // is an ES next node. + transformFlags |= TransformFlags.AssertESNext; } break; diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index 58cf1a1c01a..1a8ed7da5eb 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -11,10 +11,10 @@ namespace ts { } function visitor(node: Node): VisitResult { - if (node.transformFlags & TransformFlags.Experimental) { + if (node.transformFlags & TransformFlags.ESNext) { return visitorWorker(node); } - else if (node.transformFlags & TransformFlags.ContainsExperimental) { + else if (node.transformFlags & TransformFlags.ContainsESNext) { return visitEachChild(node, visitor, context); } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c9a51a9622b..e331ebc02f6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3463,8 +3463,8 @@ namespace ts { ContainsTypeScript = 1 << 1, Jsx = 1 << 2, ContainsJsx = 1 << 3, - Experimental = 1 << 4, - ContainsExperimental = 1 << 5, + ESNext = 1 << 4, + ContainsESNext = 1 << 5, ES2017 = 1 << 6, ContainsES2017 = 1 << 7, ES2016 = 1 << 8, @@ -3498,7 +3498,7 @@ namespace ts { // - Bitmasks that are used to assert facts about the syntax of a node and its subtree. AssertTypeScript = TypeScript | ContainsTypeScript, AssertJsx = Jsx | ContainsJsx, - AssertExperimental = Experimental | ContainsExperimental, + AssertESNext = ESNext | ContainsESNext, AssertES2017 = ES2017 | ContainsES2017, AssertES2016 = ES2016 | ContainsES2016, AssertES2015 = ES2015 | ContainsES2015, @@ -3508,7 +3508,7 @@ namespace ts { // Scope Exclusions // - Bitmasks that exclude flags from propagating out of a specific context // into the subtree flags of their container. - NodeExcludes = TypeScript | Jsx | Experimental | ES2017 | ES2016 | ES2015 | DestructuringAssignment | Generator | HasComputedFlags, + NodeExcludes = TypeScript | Jsx | ESNext | ES2017 | ES2016 | ES2015 | DestructuringAssignment | Generator | HasComputedFlags, ArrowFunctionExcludes = NodeExcludes | ContainsDecorators | ContainsDefaultValueAssignments | ContainsLexicalThis | ContainsParameterPropertyAssignments | ContainsBlockScopedBinding | ContainsYield | ContainsHoistedDeclarationOrCompletion, FunctionExcludes = NodeExcludes | ContainsDecorators | ContainsDefaultValueAssignments | ContainsCapturedLexicalThis | ContainsLexicalThis | ContainsParameterPropertyAssignments | ContainsBlockScopedBinding | ContainsYield | ContainsHoistedDeclarationOrCompletion, ConstructorExcludes = NodeExcludes | ContainsDefaultValueAssignments | ContainsLexicalThis | ContainsCapturedLexicalThis | ContainsBlockScopedBinding | ContainsYield | ContainsHoistedDeclarationOrCompletion,