@typescript-deploys/pr-build 5.1.0-pr-53034-6 → 5.1.0-pr-52838-7

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
 
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-insiders.20230228`;
26
+ var version = `${versionMajorMinor}.0-insiders.20230301`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -45905,10 +45905,6 @@ function createTypeChecker(host) {
45905
45905
  return;
45906
45906
  merged.exports.set(name, merged.exports.has(name) ? mergeSymbol(merged.exports.get(name), s) : s);
45907
45907
  });
45908
- if (merged === exported) {
45909
- getSymbolLinks(merged).resolvedExports = void 0;
45910
- getSymbolLinks(merged).resolvedMembers = void 0;
45911
- }
45912
45908
  getSymbolLinks(merged).cjsExportMerged = merged;
45913
45909
  return links.cjsExportMerged = merged;
45914
45910
  }
@@ -49362,8 +49358,7 @@ function createTypeChecker(host) {
49362
49358
  ), modifierFlags);
49363
49359
  }
49364
49360
  function getNamespaceMembersForSerialization(symbol) {
49365
- const exports = getExportsOfSymbol(symbol);
49366
- return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
49361
+ return !symbol.exports ? [] : filter(arrayFrom(symbol.exports.values()), isNamespaceMember);
49367
49362
  }
49368
49363
  function isTypeOnlyNamespace(symbol) {
49369
49364
  return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
@@ -69198,16 +69193,20 @@ function createTypeChecker(host) {
69198
69193
  ) : createTupleType([type], [8 /* Variadic */]);
69199
69194
  }
69200
69195
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
69196
+ const inConstContext = isConstTypeVariable(restType);
69201
69197
  if (index >= argCount - 1) {
69202
69198
  const arg = args[argCount - 1];
69203
69199
  if (isSpreadArgument(arg)) {
69204
- return getMutableArrayOrTupleType(arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode));
69200
+ const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
69201
+ if (isArrayLikeType(spreadType)) {
69202
+ return getMutableArrayOrTupleType(spreadType);
69203
+ }
69204
+ return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext);
69205
69205
  }
69206
69206
  }
69207
69207
  const types = [];
69208
69208
  const flags = [];
69209
69209
  const names = [];
69210
- const inConstContext = isConstTypeVariable(restType);
69211
69210
  for (let i = index; i < argCount; i++) {
69212
69211
  const arg = args[i];
69213
69212
  if (isSpreadArgument(arg)) {
@@ -103839,7 +103838,7 @@ function transformNodeModule(context) {
103839
103838
 
103840
103839
  // src/compiler/transformers/declarations/diagnostics.ts
103841
103840
  function canProduceDiagnostics(node) {
103842
- return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isJSDocTypeAlias(node);
103841
+ return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isJSDocTypeAlias(node);
103843
103842
  }
103844
103843
  function createGetSymbolAccessibilityDiagnosticForNodeName(node) {
103845
103844
  if (isSetAccessor(node) || isGetAccessor(node)) {
@@ -103885,7 +103884,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) {
103885
103884
  }
103886
103885
  }
103887
103886
  function createGetSymbolAccessibilityDiagnosticForNode(node) {
103888
- if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
103887
+ if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
103889
103888
  return getVariableDeclarationTypeVisibilityError;
103890
103889
  } else if (isSetAccessor(node) || isGetAccessor(node)) {
103891
103890
  return getAccessorDeclarationTypeVisibilityError;
@@ -103910,7 +103909,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) {
103910
103909
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
103911
103910
  if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) {
103912
103911
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
103913
- } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */ || node.kind === 223 /* BinaryExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
103912
+ } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
103914
103913
  if (isStatic(node)) {
103915
103914
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
103916
103915
  } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) {
@@ -105363,16 +105362,13 @@ function transformDeclarations(context) {
105363
105362
  fakespace.symbol = props[0].parent;
105364
105363
  const exportMappings = [];
105365
105364
  let declarations = mapDefined(props, (p) => {
105366
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
105367
- return void 0;
105368
- }
105369
- const nameStr = unescapeLeadingUnderscores(p.escapedName);
105370
- if (!isIdentifierText(nameStr, 99 /* ESNext */)) {
105365
+ if (!p.valueDeclaration || !isPropertyAccessExpression(p.valueDeclaration)) {
105371
105366
  return void 0;
105372
105367
  }
105373
105368
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
105374
105369
  const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker);
105375
105370
  getSymbolAccessibilityDiagnostic = oldDiag;
105371
+ const nameStr = unescapeLeadingUnderscores(p.escapedName);
105376
105372
  const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr);
105377
105373
  const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr);
105378
105374
  if (isNonContextualKeywordName) {
package/lib/tsserver.js CHANGED
@@ -2287,7 +2287,7 @@ module.exports = __toCommonJS(server_exports);
2287
2287
 
2288
2288
  // src/compiler/corePublic.ts
2289
2289
  var versionMajorMinor = "5.1";
2290
- var version = `${versionMajorMinor}.0-insiders.20230228`;
2290
+ var version = `${versionMajorMinor}.0-insiders.20230301`;
2291
2291
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2292
2292
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2293
2293
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -50511,10 +50511,6 @@ function createTypeChecker(host) {
50511
50511
  return;
50512
50512
  merged.exports.set(name, merged.exports.has(name) ? mergeSymbol(merged.exports.get(name), s) : s);
50513
50513
  });
50514
- if (merged === exported) {
50515
- getSymbolLinks(merged).resolvedExports = void 0;
50516
- getSymbolLinks(merged).resolvedMembers = void 0;
50517
- }
50518
50514
  getSymbolLinks(merged).cjsExportMerged = merged;
50519
50515
  return links.cjsExportMerged = merged;
50520
50516
  }
@@ -53968,8 +53964,7 @@ function createTypeChecker(host) {
53968
53964
  ), modifierFlags);
53969
53965
  }
53970
53966
  function getNamespaceMembersForSerialization(symbol) {
53971
- const exports = getExportsOfSymbol(symbol);
53972
- return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
53967
+ return !symbol.exports ? [] : filter(arrayFrom(symbol.exports.values()), isNamespaceMember);
53973
53968
  }
53974
53969
  function isTypeOnlyNamespace(symbol) {
53975
53970
  return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
@@ -73804,16 +73799,20 @@ function createTypeChecker(host) {
73804
73799
  ) : createTupleType([type], [8 /* Variadic */]);
73805
73800
  }
73806
73801
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
73802
+ const inConstContext = isConstTypeVariable(restType);
73807
73803
  if (index >= argCount - 1) {
73808
73804
  const arg = args[argCount - 1];
73809
73805
  if (isSpreadArgument(arg)) {
73810
- return getMutableArrayOrTupleType(arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode));
73806
+ const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
73807
+ if (isArrayLikeType(spreadType)) {
73808
+ return getMutableArrayOrTupleType(spreadType);
73809
+ }
73810
+ return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext);
73811
73811
  }
73812
73812
  }
73813
73813
  const types = [];
73814
73814
  const flags = [];
73815
73815
  const names = [];
73816
- const inConstContext = isConstTypeVariable(restType);
73817
73816
  for (let i = index; i < argCount; i++) {
73818
73817
  const arg = args[i];
73819
73818
  if (isSpreadArgument(arg)) {
@@ -108616,7 +108615,7 @@ function transformNodeModule(context) {
108616
108615
 
108617
108616
  // src/compiler/transformers/declarations/diagnostics.ts
108618
108617
  function canProduceDiagnostics(node) {
108619
- return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isJSDocTypeAlias(node);
108618
+ return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isJSDocTypeAlias(node);
108620
108619
  }
108621
108620
  function createGetSymbolAccessibilityDiagnosticForNodeName(node) {
108622
108621
  if (isSetAccessor(node) || isGetAccessor(node)) {
@@ -108662,7 +108661,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) {
108662
108661
  }
108663
108662
  }
108664
108663
  function createGetSymbolAccessibilityDiagnosticForNode(node) {
108665
- if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
108664
+ if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
108666
108665
  return getVariableDeclarationTypeVisibilityError;
108667
108666
  } else if (isSetAccessor(node) || isGetAccessor(node)) {
108668
108667
  return getAccessorDeclarationTypeVisibilityError;
@@ -108687,7 +108686,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) {
108687
108686
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
108688
108687
  if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) {
108689
108688
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
108690
- } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */ || node.kind === 223 /* BinaryExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
108689
+ } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
108691
108690
  if (isStatic(node)) {
108692
108691
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
108693
108692
  } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) {
@@ -110140,16 +110139,13 @@ function transformDeclarations(context) {
110140
110139
  fakespace.symbol = props[0].parent;
110141
110140
  const exportMappings = [];
110142
110141
  let declarations = mapDefined(props, (p) => {
110143
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
110144
- return void 0;
110145
- }
110146
- const nameStr = unescapeLeadingUnderscores(p.escapedName);
110147
- if (!isIdentifierText(nameStr, 99 /* ESNext */)) {
110142
+ if (!p.valueDeclaration || !isPropertyAccessExpression(p.valueDeclaration)) {
110148
110143
  return void 0;
110149
110144
  }
110150
110145
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
110151
110146
  const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker);
110152
110147
  getSymbolAccessibilityDiagnostic = oldDiag;
110148
+ const nameStr = unescapeLeadingUnderscores(p.escapedName);
110153
110149
  const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr);
110154
110150
  const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr);
110155
110151
  if (isNonContextualKeywordName) {
@@ -146255,7 +146251,7 @@ function inferTypeFromReferences(program, references, cancellationToken) {
146255
146251
  const props = createMultiMap();
146256
146252
  for (const anon2 of anons) {
146257
146253
  for (const p of checker.getPropertiesOfType(anon2)) {
146258
- props.add(p.name, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());
146254
+ props.add(p.escapedName, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());
146259
146255
  }
146260
146256
  calls.push(...checker.getSignaturesOfType(anon2, 0 /* Call */));
146261
146257
  constructs.push(...checker.getSignaturesOfType(anon2, 1 /* Construct */));
@@ -6636,14 +6636,12 @@ declare namespace ts {
6636
6636
  }) | (void & {
6637
6637
  __escapedIdentifier: void;
6638
6638
  }) | InternalSymbolName;
6639
- /** ReadonlyMap where keys are `__String`s. */
6640
- interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyMap<__String, T> {
6641
- }
6642
- /** Map where keys are `__String`s. */
6643
- interface UnderscoreEscapedMap<T> extends Map<__String, T> {
6644
- }
6639
+ /** @deprecated Use ReadonlyMap<__String, T> instead. */
6640
+ type ReadonlyUnderscoreEscapedMap<T> = ReadonlyMap<__String, T>;
6641
+ /** @deprecated Use Map<__String, T> instead. */
6642
+ type UnderscoreEscapedMap<T> = Map<__String, T>;
6645
6643
  /** SymbolTable based on ES6 Map interface. */
6646
- type SymbolTable = UnderscoreEscapedMap<Symbol>;
6644
+ type SymbolTable = Map<__String, Symbol>;
6647
6645
  enum TypeFlags {
6648
6646
  Any = 1,
6649
6647
  Unknown = 2,
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-insiders.20230228`;
38
+ version = `${versionMajorMinor}.0-insiders.20230301`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -48320,10 +48320,6 @@ ${lanes.join("\n")}
48320
48320
  return;
48321
48321
  merged.exports.set(name, merged.exports.has(name) ? mergeSymbol(merged.exports.get(name), s) : s);
48322
48322
  });
48323
- if (merged === exported) {
48324
- getSymbolLinks(merged).resolvedExports = void 0;
48325
- getSymbolLinks(merged).resolvedMembers = void 0;
48326
- }
48327
48323
  getSymbolLinks(merged).cjsExportMerged = merged;
48328
48324
  return links.cjsExportMerged = merged;
48329
48325
  }
@@ -51777,8 +51773,7 @@ ${lanes.join("\n")}
51777
51773
  ), modifierFlags);
51778
51774
  }
51779
51775
  function getNamespaceMembersForSerialization(symbol) {
51780
- const exports = getExportsOfSymbol(symbol);
51781
- return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
51776
+ return !symbol.exports ? [] : filter(arrayFrom(symbol.exports.values()), isNamespaceMember);
51782
51777
  }
51783
51778
  function isTypeOnlyNamespace(symbol) {
51784
51779
  return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
@@ -71613,16 +71608,20 @@ ${lanes.join("\n")}
71613
71608
  ) : createTupleType([type], [8 /* Variadic */]);
71614
71609
  }
71615
71610
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
71611
+ const inConstContext = isConstTypeVariable(restType);
71616
71612
  if (index >= argCount - 1) {
71617
71613
  const arg = args[argCount - 1];
71618
71614
  if (isSpreadArgument(arg)) {
71619
- return getMutableArrayOrTupleType(arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode));
71615
+ const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
71616
+ if (isArrayLikeType(spreadType)) {
71617
+ return getMutableArrayOrTupleType(spreadType);
71618
+ }
71619
+ return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext);
71620
71620
  }
71621
71621
  }
71622
71622
  const types = [];
71623
71623
  const flags = [];
71624
71624
  const names = [];
71625
- const inConstContext = isConstTypeVariable(restType);
71626
71625
  for (let i = index; i < argCount; i++) {
71627
71626
  const arg = args[i];
71628
71627
  if (isSpreadArgument(arg)) {
@@ -106716,7 +106715,7 @@ ${lanes.join("\n")}
106716
106715
 
106717
106716
  // src/compiler/transformers/declarations/diagnostics.ts
106718
106717
  function canProduceDiagnostics(node) {
106719
- return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isJSDocTypeAlias(node);
106718
+ return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isJSDocTypeAlias(node);
106720
106719
  }
106721
106720
  function createGetSymbolAccessibilityDiagnosticForNodeName(node) {
106722
106721
  if (isSetAccessor(node) || isGetAccessor(node)) {
@@ -106762,7 +106761,7 @@ ${lanes.join("\n")}
106762
106761
  }
106763
106762
  }
106764
106763
  function createGetSymbolAccessibilityDiagnosticForNode(node) {
106765
- if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
106764
+ if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
106766
106765
  return getVariableDeclarationTypeVisibilityError;
106767
106766
  } else if (isSetAccessor(node) || isGetAccessor(node)) {
106768
106767
  return getAccessorDeclarationTypeVisibilityError;
@@ -106787,7 +106786,7 @@ ${lanes.join("\n")}
106787
106786
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
106788
106787
  if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) {
106789
106788
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
106790
- } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */ || node.kind === 223 /* BinaryExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
106789
+ } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
106791
106790
  if (isStatic(node)) {
106792
106791
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
106793
106792
  } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) {
@@ -108245,16 +108244,13 @@ ${lanes.join("\n")}
108245
108244
  fakespace.symbol = props[0].parent;
108246
108245
  const exportMappings = [];
108247
108246
  let declarations = mapDefined(props, (p) => {
108248
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
108249
- return void 0;
108250
- }
108251
- const nameStr = unescapeLeadingUnderscores(p.escapedName);
108252
- if (!isIdentifierText(nameStr, 99 /* ESNext */)) {
108247
+ if (!p.valueDeclaration || !isPropertyAccessExpression(p.valueDeclaration)) {
108253
108248
  return void 0;
108254
108249
  }
108255
108250
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
108256
108251
  const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker);
108257
108252
  getSymbolAccessibilityDiagnostic = oldDiag;
108253
+ const nameStr = unescapeLeadingUnderscores(p.escapedName);
108258
108254
  const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr);
108259
108255
  const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr);
108260
108256
  if (isNonContextualKeywordName) {
@@ -145041,7 +145037,7 @@ ${lanes.join("\n")}
145041
145037
  const props = createMultiMap();
145042
145038
  for (const anon2 of anons) {
145043
145039
  for (const p of checker.getPropertiesOfType(anon2)) {
145044
- props.add(p.name, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());
145040
+ props.add(p.escapedName, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());
145045
145041
  }
145046
145042
  calls.push(...checker.getSignaturesOfType(anon2, 0 /* Call */));
145047
145043
  constructs.push(...checker.getSignaturesOfType(anon2, 1 /* Construct */));
@@ -2661,14 +2661,12 @@ declare namespace ts {
2661
2661
  }) | (void & {
2662
2662
  __escapedIdentifier: void;
2663
2663
  }) | InternalSymbolName;
2664
- /** ReadonlyMap where keys are `__String`s. */
2665
- interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyMap<__String, T> {
2666
- }
2667
- /** Map where keys are `__String`s. */
2668
- interface UnderscoreEscapedMap<T> extends Map<__String, T> {
2669
- }
2664
+ /** @deprecated Use ReadonlyMap<__String, T> instead. */
2665
+ type ReadonlyUnderscoreEscapedMap<T> = ReadonlyMap<__String, T>;
2666
+ /** @deprecated Use Map<__String, T> instead. */
2667
+ type UnderscoreEscapedMap<T> = Map<__String, T>;
2670
2668
  /** SymbolTable based on ES6 Map interface. */
2671
- type SymbolTable = UnderscoreEscapedMap<Symbol>;
2669
+ type SymbolTable = Map<__String, Symbol>;
2672
2670
  enum TypeFlags {
2673
2671
  Any = 1,
2674
2672
  Unknown = 2,
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-insiders.20230228`;
38
+ version = `${versionMajorMinor}.0-insiders.20230301`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -48320,10 +48320,6 @@ ${lanes.join("\n")}
48320
48320
  return;
48321
48321
  merged.exports.set(name, merged.exports.has(name) ? mergeSymbol(merged.exports.get(name), s) : s);
48322
48322
  });
48323
- if (merged === exported) {
48324
- getSymbolLinks(merged).resolvedExports = void 0;
48325
- getSymbolLinks(merged).resolvedMembers = void 0;
48326
- }
48327
48323
  getSymbolLinks(merged).cjsExportMerged = merged;
48328
48324
  return links.cjsExportMerged = merged;
48329
48325
  }
@@ -51777,8 +51773,7 @@ ${lanes.join("\n")}
51777
51773
  ), modifierFlags);
51778
51774
  }
51779
51775
  function getNamespaceMembersForSerialization(symbol) {
51780
- const exports = getExportsOfSymbol(symbol);
51781
- return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
51776
+ return !symbol.exports ? [] : filter(arrayFrom(symbol.exports.values()), isNamespaceMember);
51782
51777
  }
51783
51778
  function isTypeOnlyNamespace(symbol) {
51784
51779
  return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
@@ -71613,16 +71608,20 @@ ${lanes.join("\n")}
71613
71608
  ) : createTupleType([type], [8 /* Variadic */]);
71614
71609
  }
71615
71610
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
71611
+ const inConstContext = isConstTypeVariable(restType);
71616
71612
  if (index >= argCount - 1) {
71617
71613
  const arg = args[argCount - 1];
71618
71614
  if (isSpreadArgument(arg)) {
71619
- return getMutableArrayOrTupleType(arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode));
71615
+ const spreadType = arg.kind === 234 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
71616
+ if (isArrayLikeType(spreadType)) {
71617
+ return getMutableArrayOrTupleType(spreadType);
71618
+ }
71619
+ return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 227 /* SpreadElement */ ? arg.expression : arg), inConstContext);
71620
71620
  }
71621
71621
  }
71622
71622
  const types = [];
71623
71623
  const flags = [];
71624
71624
  const names = [];
71625
- const inConstContext = isConstTypeVariable(restType);
71626
71625
  for (let i = index; i < argCount; i++) {
71627
71626
  const arg = args[i];
71628
71627
  if (isSpreadArgument(arg)) {
@@ -106716,7 +106715,7 @@ ${lanes.join("\n")}
106716
106715
 
106717
106716
  // src/compiler/transformers/declarations/diagnostics.ts
106718
106717
  function canProduceDiagnostics(node) {
106719
- return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isJSDocTypeAlias(node);
106718
+ return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isJSDocTypeAlias(node);
106720
106719
  }
106721
106720
  function createGetSymbolAccessibilityDiagnosticForNodeName(node) {
106722
106721
  if (isSetAccessor(node) || isGetAccessor(node)) {
@@ -106762,7 +106761,7 @@ ${lanes.join("\n")}
106762
106761
  }
106763
106762
  }
106764
106763
  function createGetSymbolAccessibilityDiagnosticForNode(node) {
106765
- if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
106764
+ if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) {
106766
106765
  return getVariableDeclarationTypeVisibilityError;
106767
106766
  } else if (isSetAccessor(node) || isGetAccessor(node)) {
106768
106767
  return getAccessorDeclarationTypeVisibilityError;
@@ -106787,7 +106786,7 @@ ${lanes.join("\n")}
106787
106786
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
106788
106787
  if (node.kind === 257 /* VariableDeclaration */ || node.kind === 205 /* BindingElement */) {
106789
106788
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
106790
- } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 209 /* ElementAccessExpression */ || node.kind === 223 /* BinaryExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
106789
+ } else if (node.kind === 169 /* PropertyDeclaration */ || node.kind === 208 /* PropertyAccessExpression */ || node.kind === 168 /* PropertySignature */ || node.kind === 166 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) {
106791
106790
  if (isStatic(node)) {
106792
106791
  return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
106793
106792
  } else if (node.parent.kind === 260 /* ClassDeclaration */ || node.kind === 166 /* Parameter */) {
@@ -108245,16 +108244,13 @@ ${lanes.join("\n")}
108245
108244
  fakespace.symbol = props[0].parent;
108246
108245
  const exportMappings = [];
108247
108246
  let declarations = mapDefined(props, (p) => {
108248
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
108249
- return void 0;
108250
- }
108251
- const nameStr = unescapeLeadingUnderscores(p.escapedName);
108252
- if (!isIdentifierText(nameStr, 99 /* ESNext */)) {
108247
+ if (!p.valueDeclaration || !isPropertyAccessExpression(p.valueDeclaration)) {
108253
108248
  return void 0;
108254
108249
  }
108255
108250
  getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
108256
108251
  const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker);
108257
108252
  getSymbolAccessibilityDiagnostic = oldDiag;
108253
+ const nameStr = unescapeLeadingUnderscores(p.escapedName);
108258
108254
  const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr);
108259
108255
  const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr);
108260
108256
  if (isNonContextualKeywordName) {
@@ -145055,7 +145051,7 @@ ${lanes.join("\n")}
145055
145051
  const props = createMultiMap();
145056
145052
  for (const anon2 of anons) {
145057
145053
  for (const p of checker.getPropertiesOfType(anon2)) {
145058
- props.add(p.name, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());
145054
+ props.add(p.escapedName, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType());
145059
145055
  }
145060
145056
  calls.push(...checker.getSignaturesOfType(anon2, 0 /* Call */));
145061
145057
  constructs.push(...checker.getSignaturesOfType(anon2, 1 /* Construct */));
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.1";
57
- var version = `${versionMajorMinor}.0-insiders.20230228`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230301`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.1.0-pr-53034-6",
5
+ "version": "5.1.0-pr-52838-7",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -41,21 +41,21 @@
41
41
  "devDependencies": {
42
42
  "@esfx/canceltoken": "^1.0.0",
43
43
  "@octokit/rest": "latest",
44
- "@types/chai": "latest",
44
+ "@types/chai": "^4.3.4",
45
45
  "@types/fs-extra": "^9.0.13",
46
- "@types/glob": "latest",
47
- "@types/microsoft__typescript-etw": "latest",
48
- "@types/minimist": "latest",
49
- "@types/mocha": "latest",
50
- "@types/ms": "latest",
46
+ "@types/glob": "^8.1.0",
47
+ "@types/microsoft__typescript-etw": "^0.1.1",
48
+ "@types/minimist": "^1.2.2",
49
+ "@types/mocha": "^10.0.1",
50
+ "@types/ms": "^0.7.31",
51
51
  "@types/node": "latest",
52
- "@types/source-map-support": "latest",
52
+ "@types/source-map-support": "^0.5.6",
53
53
  "@types/which": "^2.0.1",
54
54
  "@typescript-eslint/eslint-plugin": "^5.33.1",
55
55
  "@typescript-eslint/parser": "^5.33.1",
56
56
  "@typescript-eslint/utils": "^5.33.1",
57
57
  "azure-devops-node-api": "^11.2.0",
58
- "chai": "latest",
58
+ "chai": "^4.3.7",
59
59
  "chalk": "^4.1.2",
60
60
  "chokidar": "^3.5.3",
61
61
  "del": "^6.1.1",
@@ -72,12 +72,12 @@
72
72
  "glob": "^8.1.0",
73
73
  "hereby": "^1.6.4",
74
74
  "jsonc-parser": "^3.2.0",
75
- "minimist": "latest",
76
- "mocha": "latest",
77
- "mocha-fivemat-progress-reporter": "latest",
75
+ "minimist": "^1.2.8",
76
+ "mocha": "^10.2.0",
77
+ "mocha-fivemat-progress-reporter": "^0.1.0",
78
78
  "ms": "^2.1.3",
79
79
  "node-fetch": "^3.2.10",
80
- "source-map-support": "latest",
80
+ "source-map-support": "^0.5.21",
81
81
  "typescript": "5.0.0-dev.20230112",
82
82
  "which": "^2.0.2"
83
83
  },