mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Fix transform flags for certain ES2020 features. (#52445)
This commit is contained in:
parent
537cd60d9a
commit
1af17f8817
@ -1105,7 +1105,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
function createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral {
|
||||
const node = createBaseToken<BigIntLiteral>(SyntaxKind.BigIntLiteral);
|
||||
node.text = typeof value === "string" ? value : pseudoBigIntToString(value) + "n";
|
||||
node.transformFlags |= TransformFlags.ContainsESNext;
|
||||
node.transformFlags |= TransformFlags.ContainsES2020;
|
||||
return node;
|
||||
}
|
||||
|
||||
@ -3675,7 +3675,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
node.transformFlags |= TransformFlags.ContainsES2015;
|
||||
break;
|
||||
case SyntaxKind.ImportKeyword:
|
||||
node.transformFlags |= TransformFlags.ContainsESNext;
|
||||
node.transformFlags |= TransformFlags.ContainsES2020;
|
||||
break;
|
||||
default:
|
||||
return Debug.assertNever(keywordToken);
|
||||
@ -4715,7 +4715,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
node.name = name;
|
||||
node.transformFlags |=
|
||||
propagateChildFlags(node.name) |
|
||||
TransformFlags.ContainsESNext;
|
||||
TransformFlags.ContainsES2020;
|
||||
node.transformFlags &= ~TransformFlags.ContainsPossibleTopLevelAwait; // always parsed in an Await context
|
||||
return node;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user