typescript 4.6.0-dev.20211105 → 4.6.0-dev.20211106

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/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.6";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20211105";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20211106";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -50796,7 +50796,7 @@ var ts;
50796
50796
  var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
50797
50797
  var flags = 4 | (leftProp.flags & 16777216);
50798
50798
  var result = createSymbol(flags, leftProp.escapedName);
50799
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
50799
+ result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2);
50800
50800
  result.leftSpread = leftProp;
50801
50801
  result.rightSpread = rightProp;
50802
50802
  result.declarations = declarations;
package/lib/tsserver.js CHANGED
@@ -100,7 +100,7 @@ var ts;
100
100
  // The following is baselined as a literal template type without intervention
101
101
  /** The version of the TypeScript compiler release */
102
102
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
103
- ts.version = ts.versionMajorMinor + ".0-dev.20211105";
103
+ ts.version = ts.versionMajorMinor + ".0-dev.20211106";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -61133,7 +61133,7 @@ var ts;
61133
61133
  var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
61134
61134
  var flags = 4 /* Property */ | (leftProp.flags & 16777216 /* Optional */);
61135
61135
  var result = createSymbol(flags, leftProp.escapedName);
61136
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
61136
+ result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
61137
61137
  result.leftSpread = leftProp;
61138
61138
  result.rightSpread = rightProp;
61139
61139
  result.declarations = declarations;
@@ -152415,10 +152415,22 @@ var ts;
152415
152415
  if (usage.numberIndex) {
152416
152416
  types.push(checker.createArrayType(combineFromUsage(usage.numberIndex)));
152417
152417
  }
152418
- if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.calls) === null || _b === void 0 ? void 0 : _b.length) || ((_c = usage.constructs) === null || _c === void 0 ? void 0 : _c.length) || usage.stringIndex) {
152418
+ if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.constructs) === null || _b === void 0 ? void 0 : _b.length) || usage.stringIndex) {
152419
152419
  types.push(inferStructuralType(usage));
152420
152420
  }
152421
- types.push.apply(types, (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); }));
152421
+ var candidateTypes = (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); });
152422
+ var callsType = ((_c = usage.calls) === null || _c === void 0 ? void 0 : _c.length) ? inferStructuralType(usage) : undefined;
152423
+ if (callsType && candidateTypes) {
152424
+ types.push(checker.getUnionType(__spreadArray([callsType], candidateTypes, true), 2 /* Subtype */));
152425
+ }
152426
+ else {
152427
+ if (callsType) {
152428
+ types.push(callsType);
152429
+ }
152430
+ if (ts.length(candidateTypes)) {
152431
+ types.push.apply(types, candidateTypes);
152432
+ }
152433
+ }
152422
152434
  types.push.apply(types, inferNamedTypesFromProperties(usage));
152423
152435
  return types;
152424
152436
  }
@@ -155249,11 +155261,12 @@ var ts;
155249
155261
  return node.expression;
155250
155262
  }
155251
155263
  }
155252
- else if (ts.isVariableStatement(node)) {
155264
+ else if (ts.isVariableStatement(node) || ts.isVariableDeclarationList(node)) {
155265
+ var declarations_5 = ts.isVariableStatement(node) ? node.declarationList.declarations : node.declarations;
155253
155266
  var numInitializers = 0;
155254
155267
  var lastInitializer = void 0;
155255
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
155256
- var declaration = _a[_i];
155268
+ for (var _i = 0, declarations_4 = declarations_5; _i < declarations_4.length; _i++) {
155269
+ var declaration = declarations_4[_i];
155257
155270
  if (declaration.initializer) {
155258
155271
  numInitializers++;
155259
155272
  lastInitializer = declaration.initializer;
@@ -159323,8 +159336,8 @@ var ts;
159323
159336
  var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations, checker);
159324
159337
  if (checker && (doc.length === 0 || declarations.some(hasJSDocInheritDocTag))) {
159325
159338
  var seenSymbols_1 = new ts.Set();
159326
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
159327
- var declaration = declarations_4[_i];
159339
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
159340
+ var declaration = declarations_6[_i];
159328
159341
  var inheritedDocs = findBaseOfDeclaration(checker, declaration, function (symbol) {
159329
159342
  if (!seenSymbols_1.has(symbol)) {
159330
159343
  seenSymbols_1.add(symbol);
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20211105";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20211106";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -61327,7 +61327,7 @@ var ts;
61327
61327
  var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
61328
61328
  var flags = 4 /* Property */ | (leftProp.flags & 16777216 /* Optional */);
61329
61329
  var result = createSymbol(flags, leftProp.escapedName);
61330
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
61330
+ result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
61331
61331
  result.leftSpread = leftProp;
61332
61332
  result.rightSpread = rightProp;
61333
61333
  result.declarations = declarations;
@@ -152997,10 +152997,22 @@ var ts;
152997
152997
  if (usage.numberIndex) {
152998
152998
  types.push(checker.createArrayType(combineFromUsage(usage.numberIndex)));
152999
152999
  }
153000
- if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.calls) === null || _b === void 0 ? void 0 : _b.length) || ((_c = usage.constructs) === null || _c === void 0 ? void 0 : _c.length) || usage.stringIndex) {
153000
+ if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.constructs) === null || _b === void 0 ? void 0 : _b.length) || usage.stringIndex) {
153001
153001
  types.push(inferStructuralType(usage));
153002
153002
  }
153003
- types.push.apply(types, (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); }));
153003
+ var candidateTypes = (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); });
153004
+ var callsType = ((_c = usage.calls) === null || _c === void 0 ? void 0 : _c.length) ? inferStructuralType(usage) : undefined;
153005
+ if (callsType && candidateTypes) {
153006
+ types.push(checker.getUnionType(__spreadArray([callsType], candidateTypes, true), 2 /* Subtype */));
153007
+ }
153008
+ else {
153009
+ if (callsType) {
153010
+ types.push(callsType);
153011
+ }
153012
+ if (ts.length(candidateTypes)) {
153013
+ types.push.apply(types, candidateTypes);
153014
+ }
153015
+ }
153004
153016
  types.push.apply(types, inferNamedTypesFromProperties(usage));
153005
153017
  return types;
153006
153018
  }
@@ -155831,11 +155843,12 @@ var ts;
155831
155843
  return node.expression;
155832
155844
  }
155833
155845
  }
155834
- else if (ts.isVariableStatement(node)) {
155846
+ else if (ts.isVariableStatement(node) || ts.isVariableDeclarationList(node)) {
155847
+ var declarations_5 = ts.isVariableStatement(node) ? node.declarationList.declarations : node.declarations;
155835
155848
  var numInitializers = 0;
155836
155849
  var lastInitializer = void 0;
155837
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
155838
- var declaration = _a[_i];
155850
+ for (var _i = 0, declarations_4 = declarations_5; _i < declarations_4.length; _i++) {
155851
+ var declaration = declarations_4[_i];
155839
155852
  if (declaration.initializer) {
155840
155853
  numInitializers++;
155841
155854
  lastInitializer = declaration.initializer;
@@ -159905,8 +159918,8 @@ var ts;
159905
159918
  var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations, checker);
159906
159919
  if (checker && (doc.length === 0 || declarations.some(hasJSDocInheritDocTag))) {
159907
159920
  var seenSymbols_1 = new ts.Set();
159908
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
159909
- var declaration = declarations_4[_i];
159921
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
159922
+ var declaration = declarations_6[_i];
159910
159923
  var inheritedDocs = findBaseOfDeclaration(checker, declaration, function (symbol) {
159911
159924
  if (!seenSymbols_1.has(symbol)) {
159912
159925
  seenSymbols_1.add(symbol);
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20211105";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20211106";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -61327,7 +61327,7 @@ var ts;
61327
61327
  var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
61328
61328
  var flags = 4 /* Property */ | (leftProp.flags & 16777216 /* Optional */);
61329
61329
  var result = createSymbol(flags, leftProp.escapedName);
61330
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
61330
+ result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
61331
61331
  result.leftSpread = leftProp;
61332
61332
  result.rightSpread = rightProp;
61333
61333
  result.declarations = declarations;
@@ -152997,10 +152997,22 @@ var ts;
152997
152997
  if (usage.numberIndex) {
152998
152998
  types.push(checker.createArrayType(combineFromUsage(usage.numberIndex)));
152999
152999
  }
153000
- if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.calls) === null || _b === void 0 ? void 0 : _b.length) || ((_c = usage.constructs) === null || _c === void 0 ? void 0 : _c.length) || usage.stringIndex) {
153000
+ if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.constructs) === null || _b === void 0 ? void 0 : _b.length) || usage.stringIndex) {
153001
153001
  types.push(inferStructuralType(usage));
153002
153002
  }
153003
- types.push.apply(types, (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); }));
153003
+ var candidateTypes = (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); });
153004
+ var callsType = ((_c = usage.calls) === null || _c === void 0 ? void 0 : _c.length) ? inferStructuralType(usage) : undefined;
153005
+ if (callsType && candidateTypes) {
153006
+ types.push(checker.getUnionType(__spreadArray([callsType], candidateTypes, true), 2 /* Subtype */));
153007
+ }
153008
+ else {
153009
+ if (callsType) {
153010
+ types.push(callsType);
153011
+ }
153012
+ if (ts.length(candidateTypes)) {
153013
+ types.push.apply(types, candidateTypes);
153014
+ }
153015
+ }
153004
153016
  types.push.apply(types, inferNamedTypesFromProperties(usage));
153005
153017
  return types;
153006
153018
  }
@@ -155831,11 +155843,12 @@ var ts;
155831
155843
  return node.expression;
155832
155844
  }
155833
155845
  }
155834
- else if (ts.isVariableStatement(node)) {
155846
+ else if (ts.isVariableStatement(node) || ts.isVariableDeclarationList(node)) {
155847
+ var declarations_5 = ts.isVariableStatement(node) ? node.declarationList.declarations : node.declarations;
155835
155848
  var numInitializers = 0;
155836
155849
  var lastInitializer = void 0;
155837
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
155838
- var declaration = _a[_i];
155850
+ for (var _i = 0, declarations_4 = declarations_5; _i < declarations_4.length; _i++) {
155851
+ var declaration = declarations_4[_i];
155839
155852
  if (declaration.initializer) {
155840
155853
  numInitializers++;
155841
155854
  lastInitializer = declaration.initializer;
@@ -159905,8 +159918,8 @@ var ts;
159905
159918
  var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations, checker);
159906
159919
  if (checker && (doc.length === 0 || declarations.some(hasJSDocInheritDocTag))) {
159907
159920
  var seenSymbols_1 = new ts.Set();
159908
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
159909
- var declaration = declarations_4[_i];
159921
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
159922
+ var declaration = declarations_6[_i];
159910
159923
  var inheritedDocs = findBaseOfDeclaration(checker, declaration, function (symbol) {
159911
159924
  if (!seenSymbols_1.has(symbol)) {
159912
159925
  seenSymbols_1.add(symbol);
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20211105";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20211106";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -61327,7 +61327,7 @@ var ts;
61327
61327
  var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
61328
61328
  var flags = 4 /* Property */ | (leftProp.flags & 16777216 /* Optional */);
61329
61329
  var result = createSymbol(flags, leftProp.escapedName);
61330
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
61330
+ result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
61331
61331
  result.leftSpread = leftProp;
61332
61332
  result.rightSpread = rightProp;
61333
61333
  result.declarations = declarations;
@@ -152997,10 +152997,22 @@ var ts;
152997
152997
  if (usage.numberIndex) {
152998
152998
  types.push(checker.createArrayType(combineFromUsage(usage.numberIndex)));
152999
152999
  }
153000
- if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.calls) === null || _b === void 0 ? void 0 : _b.length) || ((_c = usage.constructs) === null || _c === void 0 ? void 0 : _c.length) || usage.stringIndex) {
153000
+ if (((_a = usage.properties) === null || _a === void 0 ? void 0 : _a.size) || ((_b = usage.constructs) === null || _b === void 0 ? void 0 : _b.length) || usage.stringIndex) {
153001
153001
  types.push(inferStructuralType(usage));
153002
153002
  }
153003
- types.push.apply(types, (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); }));
153003
+ var candidateTypes = (usage.candidateTypes || []).map(function (t) { return checker.getBaseTypeOfLiteralType(t); });
153004
+ var callsType = ((_c = usage.calls) === null || _c === void 0 ? void 0 : _c.length) ? inferStructuralType(usage) : undefined;
153005
+ if (callsType && candidateTypes) {
153006
+ types.push(checker.getUnionType(__spreadArray([callsType], candidateTypes, true), 2 /* Subtype */));
153007
+ }
153008
+ else {
153009
+ if (callsType) {
153010
+ types.push(callsType);
153011
+ }
153012
+ if (ts.length(candidateTypes)) {
153013
+ types.push.apply(types, candidateTypes);
153014
+ }
153015
+ }
153004
153016
  types.push.apply(types, inferNamedTypesFromProperties(usage));
153005
153017
  return types;
153006
153018
  }
@@ -155831,11 +155843,12 @@ var ts;
155831
155843
  return node.expression;
155832
155844
  }
155833
155845
  }
155834
- else if (ts.isVariableStatement(node)) {
155846
+ else if (ts.isVariableStatement(node) || ts.isVariableDeclarationList(node)) {
155847
+ var declarations_5 = ts.isVariableStatement(node) ? node.declarationList.declarations : node.declarations;
155835
155848
  var numInitializers = 0;
155836
155849
  var lastInitializer = void 0;
155837
- for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
155838
- var declaration = _a[_i];
155850
+ for (var _i = 0, declarations_4 = declarations_5; _i < declarations_4.length; _i++) {
155851
+ var declaration = declarations_4[_i];
155839
155852
  if (declaration.initializer) {
155840
155853
  numInitializers++;
155841
155854
  lastInitializer = declaration.initializer;
@@ -159905,8 +159918,8 @@ var ts;
159905
159918
  var doc = ts.JsDoc.getJsDocCommentsFromDeclarations(declarations, checker);
159906
159919
  if (checker && (doc.length === 0 || declarations.some(hasJSDocInheritDocTag))) {
159907
159920
  var seenSymbols_1 = new ts.Set();
159908
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
159909
- var declaration = declarations_4[_i];
159921
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
159922
+ var declaration = declarations_6[_i];
159910
159923
  var inheritedDocs = findBaseOfDeclaration(checker, declaration, function (symbol) {
159911
159924
  if (!seenSymbols_1.has(symbol)) {
159912
159925
  seenSymbols_1.add(symbol);
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20211105";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20211106";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -61122,7 +61122,7 @@ var ts;
61122
61122
  var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
61123
61123
  var flags = 4 /* Property */ | (leftProp.flags & 16777216 /* Optional */);
61124
61124
  var result = createSymbol(flags, leftProp.escapedName);
61125
- result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
61125
+ result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2 /* Subtype */);
61126
61126
  result.leftSpread = leftProp;
61127
61127
  result.rightSpread = rightProp;
61128
61128
  result.declarations = declarations;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.6.0-dev.20211105",
5
+ "version": "4.6.0-dev.20211106",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [