typescript 4.9.0-dev.20220907 → 4.9.0-dev.20220910

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.9";
72
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220907");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220910");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -32321,6 +32321,7 @@ var ts;
32321
32321
  shortName: "h",
32322
32322
  type: "boolean",
32323
32323
  showInSimplifiedHelpView: true,
32324
+ isCommandLineOnly: true,
32324
32325
  category: ts.Diagnostics.Command_line_Options,
32325
32326
  description: ts.Diagnostics.Print_this_message,
32326
32327
  defaultValueDescription: false,
@@ -32329,6 +32330,8 @@ var ts;
32329
32330
  name: "help",
32330
32331
  shortName: "?",
32331
32332
  type: "boolean",
32333
+ isCommandLineOnly: true,
32334
+ category: ts.Diagnostics.Command_line_Options,
32332
32335
  defaultValueDescription: false,
32333
32336
  },
32334
32337
  {
@@ -49215,6 +49218,10 @@ var ts;
49215
49218
  return mapType(type, getLowerBoundOfKeyType);
49216
49219
  }
49217
49220
  if (type.flags & 2097152) {
49221
+ var types = type.types;
49222
+ if (types.length === 2 && !!(types[0].flags & (4 | 8 | 64)) && types[1] === emptyTypeLiteralType) {
49223
+ return type;
49224
+ }
49218
49225
  return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
49219
49226
  }
49220
49227
  return type;
@@ -55812,8 +55819,8 @@ var ts;
55812
55819
  if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
55813
55820
  var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
55814
55821
  var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
55815
- if (result = skipTrue ? -1 : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2, false)) {
55816
- result &= skipFalse ? -1 : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2, false);
55822
+ if (result = skipTrue ? -1 : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2, false, undefined, intersectionState)) {
55823
+ result &= skipFalse ? -1 : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2, false, undefined, intersectionState);
55817
55824
  if (result) {
55818
55825
  return result;
55819
55826
  }
@@ -76359,7 +76366,7 @@ var ts;
76359
76366
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
76360
76367
  }
76361
76368
  var nodeArguments = node.arguments;
76362
- if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
76369
+ if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext && moduleKind !== ts.ModuleKind.Node16) {
76363
76370
  checkGrammarForDisallowedTrailingComma(nodeArguments);
76364
76371
  if (nodeArguments.length > 1) {
76365
76372
  var assertionArgument = nodeArguments[1];
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220907");
112
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220910");
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -39899,6 +39899,7 @@ var ts;
39899
39899
  shortName: "h",
39900
39900
  type: "boolean",
39901
39901
  showInSimplifiedHelpView: true,
39902
+ isCommandLineOnly: true,
39902
39903
  category: ts.Diagnostics.Command_line_Options,
39903
39904
  description: ts.Diagnostics.Print_this_message,
39904
39905
  defaultValueDescription: false,
@@ -39907,6 +39908,8 @@ var ts;
39907
39908
  name: "help",
39908
39909
  shortName: "?",
39909
39910
  type: "boolean",
39911
+ isCommandLineOnly: true,
39912
+ category: ts.Diagnostics.Command_line_Options,
39910
39913
  defaultValueDescription: false,
39911
39914
  },
39912
39915
  {
@@ -59376,6 +59379,12 @@ var ts;
59376
59379
  return mapType(type, getLowerBoundOfKeyType);
59377
59380
  }
59378
59381
  if (type.flags & 2097152 /* TypeFlags.Intersection */) {
59382
+ // Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
59383
+ // and bigint & {} intersections that are used to prevent subtype reduction in union types.
59384
+ var types = type.types;
59385
+ if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
59386
+ return type;
59387
+ }
59379
59388
  return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
59380
59389
  }
59381
59390
  return type;
@@ -66885,8 +66894,8 @@ var ts;
66885
66894
  var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
66886
66895
  var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
66887
66896
  // TODO: Find a nice way to include potential conditional type breakdowns in error output, if they seem good (they usually don't)
66888
- if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false)) {
66889
- result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false);
66897
+ if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
66898
+ result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66890
66899
  if (result) {
66891
66900
  return result;
66892
66901
  }
@@ -90602,7 +90611,7 @@ var ts;
90602
90611
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
90603
90612
  }
90604
90613
  var nodeArguments = node.arguments;
90605
- if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
90614
+ if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext && moduleKind !== ts.ModuleKind.Node16) {
90606
90615
  // We are allowed trailing comma after proposal-import-assertions.
90607
90616
  checkGrammarForDisallowedTrailingComma(nodeArguments);
90608
90617
  if (nodeArguments.length > 1) {
@@ -148416,7 +148425,7 @@ var ts;
148416
148425
  rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
148417
148426
  // in other cases there should be no space between '?' and next token
148418
148427
  rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148419
- rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148428
+ rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
148420
148429
  rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148421
148430
  rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
148422
148431
  // Special handling of unary operators.
@@ -149086,6 +149095,11 @@ var ts;
149086
149095
  function isSemicolonInsertionContext(context) {
149087
149096
  return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
149088
149097
  }
149098
+ function isNotPropertyAccessOnIntegerLiteral(context) {
149099
+ return !ts.isPropertyAccessExpression(context.contextNode)
149100
+ || !ts.isNumericLiteral(context.contextNode.expression)
149101
+ || context.contextNode.expression.getText().indexOf(".") !== -1;
149102
+ }
149089
149103
  })(formatting = ts.formatting || (ts.formatting = {}));
149090
149104
  })(ts || (ts = {}));
149091
149105
  /* @internal */
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220907");
111
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220910");
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -39898,6 +39898,7 @@ var ts;
39898
39898
  shortName: "h",
39899
39899
  type: "boolean",
39900
39900
  showInSimplifiedHelpView: true,
39901
+ isCommandLineOnly: true,
39901
39902
  category: ts.Diagnostics.Command_line_Options,
39902
39903
  description: ts.Diagnostics.Print_this_message,
39903
39904
  defaultValueDescription: false,
@@ -39906,6 +39907,8 @@ var ts;
39906
39907
  name: "help",
39907
39908
  shortName: "?",
39908
39909
  type: "boolean",
39910
+ isCommandLineOnly: true,
39911
+ category: ts.Diagnostics.Command_line_Options,
39909
39912
  defaultValueDescription: false,
39910
39913
  },
39911
39914
  {
@@ -59375,6 +59378,12 @@ var ts;
59375
59378
  return mapType(type, getLowerBoundOfKeyType);
59376
59379
  }
59377
59380
  if (type.flags & 2097152 /* TypeFlags.Intersection */) {
59381
+ // Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
59382
+ // and bigint & {} intersections that are used to prevent subtype reduction in union types.
59383
+ var types = type.types;
59384
+ if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
59385
+ return type;
59386
+ }
59378
59387
  return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
59379
59388
  }
59380
59389
  return type;
@@ -66884,8 +66893,8 @@ var ts;
66884
66893
  var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
66885
66894
  var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
66886
66895
  // TODO: Find a nice way to include potential conditional type breakdowns in error output, if they seem good (they usually don't)
66887
- if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false)) {
66888
- result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false);
66896
+ if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
66897
+ result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66889
66898
  if (result) {
66890
66899
  return result;
66891
66900
  }
@@ -90601,7 +90610,7 @@ var ts;
90601
90610
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
90602
90611
  }
90603
90612
  var nodeArguments = node.arguments;
90604
- if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
90613
+ if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext && moduleKind !== ts.ModuleKind.Node16) {
90605
90614
  // We are allowed trailing comma after proposal-import-assertions.
90606
90615
  checkGrammarForDisallowedTrailingComma(nodeArguments);
90607
90616
  if (nodeArguments.length > 1) {
@@ -148834,7 +148843,7 @@ var ts;
148834
148843
  rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
148835
148844
  // in other cases there should be no space between '?' and next token
148836
148845
  rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148837
- rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148846
+ rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
148838
148847
  rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148839
148848
  rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
148840
148849
  // Special handling of unary operators.
@@ -149504,6 +149513,11 @@ var ts;
149504
149513
  function isSemicolonInsertionContext(context) {
149505
149514
  return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
149506
149515
  }
149516
+ function isNotPropertyAccessOnIntegerLiteral(context) {
149517
+ return !ts.isPropertyAccessExpression(context.contextNode)
149518
+ || !ts.isNumericLiteral(context.contextNode.expression)
149519
+ || context.contextNode.expression.getText().indexOf(".") !== -1;
149520
+ }
149507
149521
  })(formatting = ts.formatting || (ts.formatting = {}));
149508
149522
  })(ts || (ts = {}));
149509
149523
  /* @internal */
package/lib/typescript.js CHANGED
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220907");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220910");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -39889,6 +39889,7 @@ var ts;
39889
39889
  shortName: "h",
39890
39890
  type: "boolean",
39891
39891
  showInSimplifiedHelpView: true,
39892
+ isCommandLineOnly: true,
39892
39893
  category: ts.Diagnostics.Command_line_Options,
39893
39894
  description: ts.Diagnostics.Print_this_message,
39894
39895
  defaultValueDescription: false,
@@ -39897,6 +39898,8 @@ var ts;
39897
39898
  name: "help",
39898
39899
  shortName: "?",
39899
39900
  type: "boolean",
39901
+ isCommandLineOnly: true,
39902
+ category: ts.Diagnostics.Command_line_Options,
39900
39903
  defaultValueDescription: false,
39901
39904
  },
39902
39905
  {
@@ -59366,6 +59369,12 @@ var ts;
59366
59369
  return mapType(type, getLowerBoundOfKeyType);
59367
59370
  }
59368
59371
  if (type.flags & 2097152 /* TypeFlags.Intersection */) {
59372
+ // Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
59373
+ // and bigint & {} intersections that are used to prevent subtype reduction in union types.
59374
+ var types = type.types;
59375
+ if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
59376
+ return type;
59377
+ }
59369
59378
  return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
59370
59379
  }
59371
59380
  return type;
@@ -66875,8 +66884,8 @@ var ts;
66875
66884
  var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
66876
66885
  var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
66877
66886
  // TODO: Find a nice way to include potential conditional type breakdowns in error output, if they seem good (they usually don't)
66878
- if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false)) {
66879
- result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false);
66887
+ if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
66888
+ result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66880
66889
  if (result) {
66881
66890
  return result;
66882
66891
  }
@@ -90592,7 +90601,7 @@ var ts;
90592
90601
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
90593
90602
  }
90594
90603
  var nodeArguments = node.arguments;
90595
- if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
90604
+ if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext && moduleKind !== ts.ModuleKind.Node16) {
90596
90605
  // We are allowed trailing comma after proposal-import-assertions.
90597
90606
  checkGrammarForDisallowedTrailingComma(nodeArguments);
90598
90607
  if (nodeArguments.length > 1) {
@@ -148825,7 +148834,7 @@ var ts;
148825
148834
  rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
148826
148835
  // in other cases there should be no space between '?' and next token
148827
148836
  rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148828
- rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148837
+ rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
148829
148838
  rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148830
148839
  rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
148831
148840
  // Special handling of unary operators.
@@ -149495,6 +149504,11 @@ var ts;
149495
149504
  function isSemicolonInsertionContext(context) {
149496
149505
  return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
149497
149506
  }
149507
+ function isNotPropertyAccessOnIntegerLiteral(context) {
149508
+ return !ts.isPropertyAccessExpression(context.contextNode)
149509
+ || !ts.isNumericLiteral(context.contextNode.expression)
149510
+ || context.contextNode.expression.getText().indexOf(".") !== -1;
149511
+ }
149498
149512
  })(formatting = ts.formatting || (ts.formatting = {}));
149499
149513
  })(ts || (ts = {}));
149500
149514
  /* @internal */
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220907");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220910");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -39889,6 +39889,7 @@ var ts;
39889
39889
  shortName: "h",
39890
39890
  type: "boolean",
39891
39891
  showInSimplifiedHelpView: true,
39892
+ isCommandLineOnly: true,
39892
39893
  category: ts.Diagnostics.Command_line_Options,
39893
39894
  description: ts.Diagnostics.Print_this_message,
39894
39895
  defaultValueDescription: false,
@@ -39897,6 +39898,8 @@ var ts;
39897
39898
  name: "help",
39898
39899
  shortName: "?",
39899
39900
  type: "boolean",
39901
+ isCommandLineOnly: true,
39902
+ category: ts.Diagnostics.Command_line_Options,
39900
39903
  defaultValueDescription: false,
39901
39904
  },
39902
39905
  {
@@ -59366,6 +59369,12 @@ var ts;
59366
59369
  return mapType(type, getLowerBoundOfKeyType);
59367
59370
  }
59368
59371
  if (type.flags & 2097152 /* TypeFlags.Intersection */) {
59372
+ // Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
59373
+ // and bigint & {} intersections that are used to prevent subtype reduction in union types.
59374
+ var types = type.types;
59375
+ if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
59376
+ return type;
59377
+ }
59369
59378
  return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
59370
59379
  }
59371
59380
  return type;
@@ -66875,8 +66884,8 @@ var ts;
66875
66884
  var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
66876
66885
  var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
66877
66886
  // TODO: Find a nice way to include potential conditional type breakdowns in error output, if they seem good (they usually don't)
66878
- if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false)) {
66879
- result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false);
66887
+ if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
66888
+ result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66880
66889
  if (result) {
66881
66890
  return result;
66882
66891
  }
@@ -90592,7 +90601,7 @@ var ts;
90592
90601
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
90593
90602
  }
90594
90603
  var nodeArguments = node.arguments;
90595
- if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
90604
+ if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext && moduleKind !== ts.ModuleKind.Node16) {
90596
90605
  // We are allowed trailing comma after proposal-import-assertions.
90597
90606
  checkGrammarForDisallowedTrailingComma(nodeArguments);
90598
90607
  if (nodeArguments.length > 1) {
@@ -148825,7 +148834,7 @@ var ts;
148825
148834
  rule("SpaceAfterQuestionMarkInConditionalOperator", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* RuleAction.InsertSpace */),
148826
148835
  // in other cases there should be no space between '?' and next token
148827
148836
  rule("NoSpaceAfterQuestionMark", 57 /* SyntaxKind.QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148828
- rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148837
+ rule("NoSpaceBeforeDot", anyToken, [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* RuleAction.DeleteSpace */),
148829
148838
  rule("NoSpaceAfterDot", [24 /* SyntaxKind.DotToken */, 28 /* SyntaxKind.QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* RuleAction.DeleteSpace */),
148830
148839
  rule("NoSpaceBetweenImportParenInImportType", 100 /* SyntaxKind.ImportKeyword */, 20 /* SyntaxKind.OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* RuleAction.DeleteSpace */),
148831
148840
  // Special handling of unary operators.
@@ -149495,6 +149504,11 @@ var ts;
149495
149504
  function isSemicolonInsertionContext(context) {
149496
149505
  return ts.positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
149497
149506
  }
149507
+ function isNotPropertyAccessOnIntegerLiteral(context) {
149508
+ return !ts.isPropertyAccessExpression(context.contextNode)
149509
+ || !ts.isNumericLiteral(context.contextNode.expression)
149510
+ || context.contextNode.expression.getText().indexOf(".") !== -1;
149511
+ }
149498
149512
  })(formatting = ts.formatting || (ts.formatting = {}));
149499
149513
  })(ts || (ts = {}));
149500
149514
  /* @internal */
@@ -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 = "".concat(ts.versionMajorMinor, ".0-dev.20220907");
92
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220910");
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -39879,6 +39879,7 @@ var ts;
39879
39879
  shortName: "h",
39880
39880
  type: "boolean",
39881
39881
  showInSimplifiedHelpView: true,
39882
+ isCommandLineOnly: true,
39882
39883
  category: ts.Diagnostics.Command_line_Options,
39883
39884
  description: ts.Diagnostics.Print_this_message,
39884
39885
  defaultValueDescription: false,
@@ -39887,6 +39888,8 @@ var ts;
39887
39888
  name: "help",
39888
39889
  shortName: "?",
39889
39890
  type: "boolean",
39891
+ isCommandLineOnly: true,
39892
+ category: ts.Diagnostics.Command_line_Options,
39890
39893
  defaultValueDescription: false,
39891
39894
  },
39892
39895
  {
@@ -59356,6 +59359,12 @@ var ts;
59356
59359
  return mapType(type, getLowerBoundOfKeyType);
59357
59360
  }
59358
59361
  if (type.flags & 2097152 /* TypeFlags.Intersection */) {
59362
+ // Similarly to getTypeFromIntersectionTypeNode, we preserve the special string & {}, number & {},
59363
+ // and bigint & {} intersections that are used to prevent subtype reduction in union types.
59364
+ var types = type.types;
59365
+ if (types.length === 2 && !!(types[0].flags & (4 /* TypeFlags.String */ | 8 /* TypeFlags.Number */ | 64 /* TypeFlags.BigInt */)) && types[1] === emptyTypeLiteralType) {
59366
+ return type;
59367
+ }
59359
59368
  return getIntersectionType(ts.sameMap(type.types, getLowerBoundOfKeyType));
59360
59369
  }
59361
59370
  return type;
@@ -66865,8 +66874,8 @@ var ts;
66865
66874
  var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
66866
66875
  var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
66867
66876
  // TODO: Find a nice way to include potential conditional type breakdowns in error output, if they seem good (they usually don't)
66868
- if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false)) {
66869
- result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false);
66877
+ if (result = skipTrue ? -1 /* Ternary.True */ : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
66878
+ result &= skipFalse ? -1 /* Ternary.True */ : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2 /* RecursionFlags.Target */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66870
66879
  if (result) {
66871
66880
  return result;
66872
66881
  }
@@ -90582,7 +90591,7 @@ var ts;
90582
90591
  return grammarErrorOnNode(node, ts.Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
90583
90592
  }
90584
90593
  var nodeArguments = node.arguments;
90585
- if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
90594
+ if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext && moduleKind !== ts.ModuleKind.Node16) {
90586
90595
  // We are allowed trailing comma after proposal-import-assertions.
90587
90596
  checkGrammarForDisallowedTrailingComma(nodeArguments);
90588
90597
  if (nodeArguments.length > 1) {
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.9.0-dev.20220907",
5
+ "version": "4.9.0-dev.20220910",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -91,7 +91,7 @@
91
91
  "ms": "^2.1.3",
92
92
  "node-fetch": "^2.6.7",
93
93
  "source-map-support": "latest",
94
- "typescript": "^4.8.2",
94
+ "typescript": "^4.8.3",
95
95
  "vinyl": "latest",
96
96
  "which": "^2.0.2",
97
97
  "xml2js": "^0.4.23"