typescript 5.1.0-dev.20230227 → 5.1.0-dev.20230301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [![Devops Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build?definitionId=7)
6
6
  [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
7
7
  [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
8
+ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript)
9
+
8
10
 
9
11
  [TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
10
12
 
@@ -82,7 +82,7 @@ interface WeakMap<K extends object, V> {
82
82
  }
83
83
 
84
84
  interface WeakMapConstructor {
85
- new <K extends object = object, V = any>(entries?: readonly [K, V][] | null): WeakMap<K, V>;
85
+ new <K extends object = object, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>;
86
86
  readonly prototype: WeakMap<object, any>;
87
87
  }
88
88
  declare var WeakMap: WeakMapConstructor;
package/lib/tsc.js CHANGED
@@ -23,7 +23,7 @@ var __export = (target, all) => {
23
23
 
24
24
  // src/compiler/corePublic.ts
25
25
  var versionMajorMinor = "5.1";
26
- var version = `${versionMajorMinor}.0-dev.20230227`;
26
+ var version = `${versionMajorMinor}.0-dev.20230301`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -842,9 +842,6 @@ function multiMapRemove(key, value) {
842
842
  }
843
843
  }
844
844
  }
845
- function createUnderscoreEscapedMultiMap() {
846
- return createMultiMap();
847
- }
848
845
  function createQueue(items) {
849
846
  const elements = (items == null ? void 0 : items.slice()) || [];
850
847
  let headIndex = 0;
@@ -47794,7 +47791,7 @@ function createTypeChecker(host) {
47794
47791
  }
47795
47792
  }
47796
47793
  const mayHaveNameCollisions = !(context.flags & 64 /* UseFullyQualifiedType */);
47797
- const seenNames = mayHaveNameCollisions ? createUnderscoreEscapedMultiMap() : void 0;
47794
+ const seenNames = mayHaveNameCollisions ? createMultiMap() : void 0;
47798
47795
  const result = [];
47799
47796
  let i = 0;
47800
47797
  for (const type of types) {
@@ -60075,7 +60072,7 @@ function createTypeChecker(host) {
60075
60072
  0 /* None */
60076
60073
  );
60077
60074
  }
60078
- } else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) {
60075
+ } else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => t === target2 || !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) {
60079
60076
  result2 &= propertiesRelatedTo(
60080
60077
  source2,
60081
60078
  target2,
@@ -85279,6 +85276,7 @@ function createDefaultValueCheck(flattenContext, value, defaultValue, location)
85279
85276
  );
85280
85277
  }
85281
85278
  function createDestructuringPropertyAccess(flattenContext, value, propertyName) {
85279
+ const { factory: factory2 } = flattenContext.context;
85282
85280
  if (isComputedPropertyName(propertyName)) {
85283
85281
  const argumentExpression = ensureIdentifier(
85284
85282
  flattenContext,
@@ -85290,7 +85288,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName)
85290
85288
  );
85291
85289
  return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression);
85292
85290
  } else if (isStringOrNumericLiteralLike(propertyName)) {
85293
- const argumentExpression = factory.cloneNode(propertyName);
85291
+ const argumentExpression = factory2.cloneNode(propertyName);
85294
85292
  return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression);
85295
85293
  } else {
85296
85294
  const name = flattenContext.context.factory.createIdentifier(idText(propertyName));
@@ -85360,28 +85358,29 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
85360
85358
  if (level === 0 /* LiftRestriction */ && !hasInvalidEscape(template)) {
85361
85359
  return visitEachChild(node, visitor, context);
85362
85360
  }
85361
+ const { factory: factory2 } = context;
85363
85362
  if (isNoSubstitutionTemplateLiteral(template)) {
85364
- cookedStrings.push(createTemplateCooked(template));
85365
- rawStrings.push(getRawLiteral(template, currentSourceFile));
85363
+ cookedStrings.push(createTemplateCooked(factory2, template));
85364
+ rawStrings.push(getRawLiteral(factory2, template, currentSourceFile));
85366
85365
  } else {
85367
- cookedStrings.push(createTemplateCooked(template.head));
85368
- rawStrings.push(getRawLiteral(template.head, currentSourceFile));
85366
+ cookedStrings.push(createTemplateCooked(factory2, template.head));
85367
+ rawStrings.push(getRawLiteral(factory2, template.head, currentSourceFile));
85369
85368
  for (const templateSpan of template.templateSpans) {
85370
- cookedStrings.push(createTemplateCooked(templateSpan.literal));
85371
- rawStrings.push(getRawLiteral(templateSpan.literal, currentSourceFile));
85369
+ cookedStrings.push(createTemplateCooked(factory2, templateSpan.literal));
85370
+ rawStrings.push(getRawLiteral(factory2, templateSpan.literal, currentSourceFile));
85372
85371
  templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression)));
85373
85372
  }
85374
85373
  }
85375
85374
  const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper(
85376
- factory.createArrayLiteralExpression(cookedStrings),
85377
- factory.createArrayLiteralExpression(rawStrings)
85375
+ factory2.createArrayLiteralExpression(cookedStrings),
85376
+ factory2.createArrayLiteralExpression(rawStrings)
85378
85377
  );
85379
85378
  if (isExternalModule(currentSourceFile)) {
85380
- const tempVar = factory.createUniqueName("templateObject");
85379
+ const tempVar = factory2.createUniqueName("templateObject");
85381
85380
  recordTaggedTemplateString(tempVar);
85382
- templateArguments[0] = factory.createLogicalOr(
85381
+ templateArguments[0] = factory2.createLogicalOr(
85383
85382
  tempVar,
85384
- factory.createAssignment(
85383
+ factory2.createAssignment(
85385
85384
  tempVar,
85386
85385
  helperCall
85387
85386
  )
@@ -85389,17 +85388,17 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
85389
85388
  } else {
85390
85389
  templateArguments[0] = helperCall;
85391
85390
  }
85392
- return factory.createCallExpression(
85391
+ return factory2.createCallExpression(
85393
85392
  tag,
85394
85393
  /*typeArguments*/
85395
85394
  void 0,
85396
85395
  templateArguments
85397
85396
  );
85398
85397
  }
85399
- function createTemplateCooked(template) {
85400
- return template.templateFlags ? factory.createVoidZero() : factory.createStringLiteral(template.text);
85398
+ function createTemplateCooked(factory2, template) {
85399
+ return template.templateFlags ? factory2.createVoidZero() : factory2.createStringLiteral(template.text);
85401
85400
  }
85402
- function getRawLiteral(node, currentSourceFile) {
85401
+ function getRawLiteral(factory2, node, currentSourceFile) {
85403
85402
  let text = node.rawText;
85404
85403
  if (text === void 0) {
85405
85404
  Debug.assertIsDefined(
@@ -85411,7 +85410,7 @@ function getRawLiteral(node, currentSourceFile) {
85411
85410
  text = text.substring(1, text.length - (isLast ? 1 : 2));
85412
85411
  }
85413
85412
  text = text.replace(/\r\n?/g, "\n");
85414
- return setTextRange(factory.createStringLiteral(text), node);
85413
+ return setTextRange(factory2.createStringLiteral(text), node);
85415
85414
  }
85416
85415
 
85417
85416
  // src/compiler/transformers/ts.ts
@@ -88867,12 +88866,14 @@ function transformClassFields(context) {
88867
88866
  if (privateIdentifierInfo.kind === "f" /* Field */) {
88868
88867
  if (!privateIdentifierInfo.isStatic) {
88869
88868
  return createPrivateInstanceFieldInitializer(
88869
+ factory2,
88870
88870
  receiver,
88871
88871
  visitNode(property.initializer, initializerVisitor, isExpression),
88872
88872
  privateIdentifierInfo.brandCheckIdentifier
88873
88873
  );
88874
88874
  } else {
88875
88875
  return createPrivateStaticFieldInitializer(
88876
+ factory2,
88876
88877
  privateIdentifierInfo.variableName,
88877
88878
  visitNode(property.initializer, initializerVisitor, isExpression)
88878
88879
  );
@@ -88954,7 +88955,7 @@ function transformClassFields(context) {
88954
88955
  Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
88955
88956
  statements.push(
88956
88957
  factory2.createExpressionStatement(
88957
- createPrivateInstanceMethodInitializer(receiver, weakSetName)
88958
+ createPrivateInstanceMethodInitializer(factory2, receiver, weakSetName)
88958
88959
  )
88959
88960
  );
88960
88961
  }
@@ -89407,25 +89408,25 @@ function transformClassFields(context) {
89407
89408
  return void 0;
89408
89409
  }
89409
89410
  }
89410
- function createPrivateStaticFieldInitializer(variableName, initializer) {
89411
- return factory.createAssignment(
89411
+ function createPrivateStaticFieldInitializer(factory2, variableName, initializer) {
89412
+ return factory2.createAssignment(
89412
89413
  variableName,
89413
- factory.createObjectLiteralExpression([
89414
- factory.createPropertyAssignment("value", initializer || factory.createVoidZero())
89414
+ factory2.createObjectLiteralExpression([
89415
+ factory2.createPropertyAssignment("value", initializer || factory2.createVoidZero())
89415
89416
  ])
89416
89417
  );
89417
89418
  }
89418
- function createPrivateInstanceFieldInitializer(receiver, initializer, weakMapName) {
89419
- return factory.createCallExpression(
89420
- factory.createPropertyAccessExpression(weakMapName, "set"),
89419
+ function createPrivateInstanceFieldInitializer(factory2, receiver, initializer, weakMapName) {
89420
+ return factory2.createCallExpression(
89421
+ factory2.createPropertyAccessExpression(weakMapName, "set"),
89421
89422
  /*typeArguments*/
89422
89423
  void 0,
89423
- [receiver, initializer || factory.createVoidZero()]
89424
+ [receiver, initializer || factory2.createVoidZero()]
89424
89425
  );
89425
89426
  }
89426
- function createPrivateInstanceMethodInitializer(receiver, weakSetName) {
89427
- return factory.createCallExpression(
89428
- factory.createPropertyAccessExpression(weakSetName, "add"),
89427
+ function createPrivateInstanceMethodInitializer(factory2, receiver, weakSetName) {
89428
+ return factory2.createCallExpression(
89429
+ factory2.createPropertyAccessExpression(weakSetName, "add"),
89429
89430
  /*typeArguments*/
89430
89431
  void 0,
89431
89432
  [receiver]
@@ -89441,6 +89442,7 @@ function isPrivateIdentifierInExpression(node) {
89441
89442
  // src/compiler/transformers/typeSerializer.ts
89442
89443
  function createRuntimeTypeSerializer(context) {
89443
89444
  const {
89445
+ factory: factory2,
89444
89446
  hoistVariableDeclaration
89445
89447
  } = context;
89446
89448
  const resolver = context.getEmitResolver();
@@ -89480,9 +89482,9 @@ function createRuntimeTypeSerializer(context) {
89480
89482
  case 260 /* ClassDeclaration */:
89481
89483
  case 228 /* ClassExpression */:
89482
89484
  case 171 /* MethodDeclaration */:
89483
- return factory.createIdentifier("Function");
89485
+ return factory2.createIdentifier("Function");
89484
89486
  default:
89485
- return factory.createVoidZero();
89487
+ return factory2.createVoidZero();
89486
89488
  }
89487
89489
  }
89488
89490
  function serializeParameterTypesOfNode(node, container) {
@@ -89503,7 +89505,7 @@ function createRuntimeTypeSerializer(context) {
89503
89505
  }
89504
89506
  }
89505
89507
  }
89506
- return factory.createArrayLiteralExpression(expressions);
89508
+ return factory2.createArrayLiteralExpression(expressions);
89507
89509
  }
89508
89510
  function getParametersOfDecoratedDeclaration(node, container) {
89509
89511
  if (container && node.kind === 174 /* GetAccessor */) {
@@ -89518,39 +89520,39 @@ function createRuntimeTypeSerializer(context) {
89518
89520
  if (isFunctionLike(node) && node.type) {
89519
89521
  return serializeTypeNode(node.type);
89520
89522
  } else if (isAsyncFunction(node)) {
89521
- return factory.createIdentifier("Promise");
89523
+ return factory2.createIdentifier("Promise");
89522
89524
  }
89523
- return factory.createVoidZero();
89525
+ return factory2.createVoidZero();
89524
89526
  }
89525
89527
  function serializeTypeNode(node) {
89526
89528
  if (node === void 0) {
89527
- return factory.createIdentifier("Object");
89529
+ return factory2.createIdentifier("Object");
89528
89530
  }
89529
89531
  node = skipTypeParentheses(node);
89530
89532
  switch (node.kind) {
89531
89533
  case 114 /* VoidKeyword */:
89532
89534
  case 155 /* UndefinedKeyword */:
89533
89535
  case 144 /* NeverKeyword */:
89534
- return factory.createVoidZero();
89536
+ return factory2.createVoidZero();
89535
89537
  case 181 /* FunctionType */:
89536
89538
  case 182 /* ConstructorType */:
89537
- return factory.createIdentifier("Function");
89539
+ return factory2.createIdentifier("Function");
89538
89540
  case 185 /* ArrayType */:
89539
89541
  case 186 /* TupleType */:
89540
- return factory.createIdentifier("Array");
89542
+ return factory2.createIdentifier("Array");
89541
89543
  case 179 /* TypePredicate */:
89542
- return node.assertsModifier ? factory.createVoidZero() : factory.createIdentifier("Boolean");
89544
+ return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean");
89543
89545
  case 134 /* BooleanKeyword */:
89544
- return factory.createIdentifier("Boolean");
89546
+ return factory2.createIdentifier("Boolean");
89545
89547
  case 200 /* TemplateLiteralType */:
89546
89548
  case 152 /* StringKeyword */:
89547
- return factory.createIdentifier("String");
89549
+ return factory2.createIdentifier("String");
89548
89550
  case 149 /* ObjectKeyword */:
89549
- return factory.createIdentifier("Object");
89551
+ return factory2.createIdentifier("Object");
89550
89552
  case 198 /* LiteralType */:
89551
89553
  return serializeLiteralOfLiteralTypeNode(node.literal);
89552
89554
  case 148 /* NumberKeyword */:
89553
- return factory.createIdentifier("Number");
89555
+ return factory2.createIdentifier("Number");
89554
89556
  case 160 /* BigIntKeyword */:
89555
89557
  return getGlobalConstructor("BigInt", 7 /* ES2020 */);
89556
89558
  case 153 /* SymbolKeyword */:
@@ -89602,13 +89604,13 @@ function createRuntimeTypeSerializer(context) {
89602
89604
  default:
89603
89605
  return Debug.failBadSyntaxKind(node);
89604
89606
  }
89605
- return factory.createIdentifier("Object");
89607
+ return factory2.createIdentifier("Object");
89606
89608
  }
89607
89609
  function serializeLiteralOfLiteralTypeNode(node) {
89608
89610
  switch (node.kind) {
89609
89611
  case 10 /* StringLiteral */:
89610
89612
  case 14 /* NoSubstitutionTemplateLiteral */:
89611
- return factory.createIdentifier("String");
89613
+ return factory2.createIdentifier("String");
89612
89614
  case 221 /* PrefixUnaryExpression */: {
89613
89615
  const operand = node.operand;
89614
89616
  switch (operand.kind) {
@@ -89620,14 +89622,14 @@ function createRuntimeTypeSerializer(context) {
89620
89622
  }
89621
89623
  }
89622
89624
  case 8 /* NumericLiteral */:
89623
- return factory.createIdentifier("Number");
89625
+ return factory2.createIdentifier("Number");
89624
89626
  case 9 /* BigIntLiteral */:
89625
89627
  return getGlobalConstructor("BigInt", 7 /* ES2020 */);
89626
89628
  case 110 /* TrueKeyword */:
89627
89629
  case 95 /* FalseKeyword */:
89628
- return factory.createIdentifier("Boolean");
89630
+ return factory2.createIdentifier("Boolean");
89629
89631
  case 104 /* NullKeyword */:
89630
- return factory.createVoidZero();
89632
+ return factory2.createVoidZero();
89631
89633
  default:
89632
89634
  return Debug.failBadSyntaxKind(node);
89633
89635
  }
@@ -89638,16 +89640,16 @@ function createRuntimeTypeSerializer(context) {
89638
89640
  typeNode = skipTypeParentheses(typeNode);
89639
89641
  if (typeNode.kind === 144 /* NeverKeyword */) {
89640
89642
  if (isIntersection)
89641
- return factory.createVoidZero();
89643
+ return factory2.createVoidZero();
89642
89644
  continue;
89643
89645
  }
89644
89646
  if (typeNode.kind === 157 /* UnknownKeyword */) {
89645
89647
  if (!isIntersection)
89646
- return factory.createIdentifier("Object");
89648
+ return factory2.createIdentifier("Object");
89647
89649
  continue;
89648
89650
  }
89649
89651
  if (typeNode.kind === 131 /* AnyKeyword */) {
89650
- return factory.createIdentifier("Object");
89652
+ return factory2.createIdentifier("Object");
89651
89653
  }
89652
89654
  if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 104 /* NullKeyword */ || typeNode.kind === 155 /* UndefinedKeyword */)) {
89653
89655
  continue;
@@ -89658,13 +89660,13 @@ function createRuntimeTypeSerializer(context) {
89658
89660
  }
89659
89661
  if (serializedType) {
89660
89662
  if (!equateSerializedTypeNodes(serializedType, serializedConstituent)) {
89661
- return factory.createIdentifier("Object");
89663
+ return factory2.createIdentifier("Object");
89662
89664
  }
89663
89665
  } else {
89664
89666
  serializedType = serializedConstituent;
89665
89667
  }
89666
89668
  }
89667
- return serializedType != null ? serializedType : factory.createVoidZero();
89669
+ return serializedType != null ? serializedType : factory2.createVoidZero();
89668
89670
  }
89669
89671
  function equateSerializedTypeNodes(left, right) {
89670
89672
  return (
@@ -89698,48 +89700,48 @@ function createRuntimeTypeSerializer(context) {
89698
89700
  switch (kind) {
89699
89701
  case 0 /* Unknown */:
89700
89702
  if (findAncestor(node, (n) => n.parent && isConditionalTypeNode(n.parent) && (n.parent.trueType === n || n.parent.falseType === n))) {
89701
- return factory.createIdentifier("Object");
89703
+ return factory2.createIdentifier("Object");
89702
89704
  }
89703
89705
  const serialized = serializeEntityNameAsExpressionFallback(node.typeName);
89704
- const temp = factory.createTempVariable(hoistVariableDeclaration);
89705
- return factory.createConditionalExpression(
89706
- factory.createTypeCheck(factory.createAssignment(temp, serialized), "function"),
89706
+ const temp = factory2.createTempVariable(hoistVariableDeclaration);
89707
+ return factory2.createConditionalExpression(
89708
+ factory2.createTypeCheck(factory2.createAssignment(temp, serialized), "function"),
89707
89709
  /*questionToken*/
89708
89710
  void 0,
89709
89711
  temp,
89710
89712
  /*colonToken*/
89711
89713
  void 0,
89712
- factory.createIdentifier("Object")
89714
+ factory2.createIdentifier("Object")
89713
89715
  );
89714
89716
  case 1 /* TypeWithConstructSignatureAndValue */:
89715
89717
  return serializeEntityNameAsExpression(node.typeName);
89716
89718
  case 2 /* VoidNullableOrNeverType */:
89717
- return factory.createVoidZero();
89719
+ return factory2.createVoidZero();
89718
89720
  case 4 /* BigIntLikeType */:
89719
89721
  return getGlobalConstructor("BigInt", 7 /* ES2020 */);
89720
89722
  case 6 /* BooleanType */:
89721
- return factory.createIdentifier("Boolean");
89723
+ return factory2.createIdentifier("Boolean");
89722
89724
  case 3 /* NumberLikeType */:
89723
- return factory.createIdentifier("Number");
89725
+ return factory2.createIdentifier("Number");
89724
89726
  case 5 /* StringLikeType */:
89725
- return factory.createIdentifier("String");
89727
+ return factory2.createIdentifier("String");
89726
89728
  case 7 /* ArrayLikeType */:
89727
- return factory.createIdentifier("Array");
89729
+ return factory2.createIdentifier("Array");
89728
89730
  case 8 /* ESSymbolType */:
89729
89731
  return getGlobalConstructor("Symbol", 2 /* ES2015 */);
89730
89732
  case 10 /* TypeWithCallSignature */:
89731
- return factory.createIdentifier("Function");
89733
+ return factory2.createIdentifier("Function");
89732
89734
  case 9 /* Promise */:
89733
- return factory.createIdentifier("Promise");
89735
+ return factory2.createIdentifier("Promise");
89734
89736
  case 11 /* ObjectType */:
89735
- return factory.createIdentifier("Object");
89737
+ return factory2.createIdentifier("Object");
89736
89738
  default:
89737
89739
  return Debug.assertNever(kind);
89738
89740
  }
89739
89741
  }
89740
89742
  function createCheckedValue(left, right) {
89741
- return factory.createLogicalAnd(
89742
- factory.createStrictInequality(factory.createTypeOfExpression(left), factory.createStringLiteral("undefined")),
89743
+ return factory2.createLogicalAnd(
89744
+ factory2.createStrictInequality(factory2.createTypeOfExpression(left), factory2.createStringLiteral("undefined")),
89743
89745
  right
89744
89746
  );
89745
89747
  }
@@ -89752,13 +89754,13 @@ function createRuntimeTypeSerializer(context) {
89752
89754
  return createCheckedValue(serializeEntityNameAsExpression(node.left), serializeEntityNameAsExpression(node));
89753
89755
  }
89754
89756
  const left = serializeEntityNameAsExpressionFallback(node.left);
89755
- const temp = factory.createTempVariable(hoistVariableDeclaration);
89756
- return factory.createLogicalAnd(
89757
- factory.createLogicalAnd(
89757
+ const temp = factory2.createTempVariable(hoistVariableDeclaration);
89758
+ return factory2.createLogicalAnd(
89759
+ factory2.createLogicalAnd(
89758
89760
  left.left,
89759
- factory.createStrictInequality(factory.createAssignment(temp, left.right), factory.createVoidZero())
89761
+ factory2.createStrictInequality(factory2.createAssignment(temp, left.right), factory2.createVoidZero())
89760
89762
  ),
89761
- factory.createPropertyAccessExpression(temp, node.right)
89763
+ factory2.createPropertyAccessExpression(temp, node.right)
89762
89764
  );
89763
89765
  }
89764
89766
  function serializeEntityNameAsExpression(node) {
@@ -89773,21 +89775,21 @@ function createRuntimeTypeSerializer(context) {
89773
89775
  }
89774
89776
  }
89775
89777
  function serializeQualifiedNameAsExpression(node) {
89776
- return factory.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left), node.right);
89778
+ return factory2.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left), node.right);
89777
89779
  }
89778
89780
  function getGlobalConstructorWithFallback(name) {
89779
- return factory.createConditionalExpression(
89780
- factory.createTypeCheck(factory.createIdentifier(name), "function"),
89781
+ return factory2.createConditionalExpression(
89782
+ factory2.createTypeCheck(factory2.createIdentifier(name), "function"),
89781
89783
  /*questionToken*/
89782
89784
  void 0,
89783
- factory.createIdentifier(name),
89785
+ factory2.createIdentifier(name),
89784
89786
  /*colonToken*/
89785
89787
  void 0,
89786
- factory.createIdentifier("Object")
89788
+ factory2.createIdentifier("Object")
89787
89789
  );
89788
89790
  }
89789
89791
  function getGlobalConstructor(name, minLanguageVersion) {
89790
- return languageVersion < minLanguageVersion ? getGlobalConstructorWithFallback(name) : factory.createIdentifier(name);
89792
+ return languageVersion < minLanguageVersion ? getGlobalConstructorWithFallback(name) : factory2.createIdentifier(name);
89791
89793
  }
89792
89794
  }
89793
89795
 
@@ -104618,7 +104620,7 @@ function transformDeclarations(context) {
104618
104620
  }
104619
104621
  const newParam = factory2.updateParameterDeclaration(
104620
104622
  p,
104621
- maskModifiers(p, modifierMask),
104623
+ maskModifiers(factory2, p, modifierMask),
104622
104624
  p.dotDotDotToken,
104623
104625
  filterBindingPatternInitializersAndRenamings(p.name),
104624
104626
  resolver.isOptionalParameter(p) ? p.questionToken || factory2.createToken(57 /* QuestionToken */) : void 0,
@@ -105732,8 +105734,8 @@ function isAlwaysType(node) {
105732
105734
  }
105733
105735
  return false;
105734
105736
  }
105735
- function maskModifiers(node, modifierMask, modifierAdditions) {
105736
- return factory.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));
105737
+ function maskModifiers(factory2, node, modifierMask, modifierAdditions) {
105738
+ return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));
105737
105739
  }
105738
105740
  function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public */, modifierAdditions = 0 /* None */) {
105739
105741
  let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions;