typescript 4.4.1-insiders.20210811 → 4.4.4

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/lib.dom.d.ts CHANGED
@@ -6400,6 +6400,12 @@ interface HTMLDocument extends Document {
6400
6400
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
6401
6401
  }
6402
6402
 
6403
+ /** @deprecated */
6404
+ declare var HTMLDocument: {
6405
+ prototype: HTMLDocument;
6406
+ new(): HTMLDocument;
6407
+ };
6408
+
6403
6409
  interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
6404
6410
  }
6405
6411
 
@@ -17201,7 +17207,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
17201
17207
 
17202
17208
  /** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
17203
17209
  interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
17204
- HTMLDocument: Document;
17205
17210
  /** @deprecated This is a legacy alias of `navigator`. */
17206
17211
  readonly clientInformation: Navigator;
17207
17212
  /**
@@ -18266,7 +18271,6 @@ declare var Image: {
18266
18271
  declare var Option: {
18267
18272
  new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
18268
18273
  };
18269
- declare var HTMLDocument: Document;
18270
18274
  /** @deprecated This is a legacy alias of `navigator`. */
18271
18275
  declare var clientInformation: Navigator;
18272
18276
  /**
package/lib/protocol.d.ts CHANGED
@@ -1954,11 +1954,7 @@ declare namespace ts.server.protocol {
1954
1954
  interface SignatureHelpResponse extends Response {
1955
1955
  body?: SignatureHelpItems;
1956
1956
  }
1957
- const enum InlayHintKind {
1958
- Type = "Type",
1959
- Parameter = "Parameter",
1960
- Enum = "Enum"
1961
- }
1957
+ type InlayHintKind = "Type" | "Parameter" | "Enum";
1962
1958
  interface InlayHintsRequestArgs extends FileRequestArgs {
1963
1959
  /**
1964
1960
  * Start position of the span.
@@ -1976,7 +1972,7 @@ declare namespace ts.server.protocol {
1976
1972
  interface InlayHintItem {
1977
1973
  text: string;
1978
1974
  position: Location;
1979
- kind?: InlayHintKind;
1975
+ kind: InlayHintKind;
1980
1976
  whitespaceBefore?: boolean;
1981
1977
  whitespaceAfter?: boolean;
1982
1978
  }
package/lib/tsc.js CHANGED
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
22
22
  ar[i] = from[i];
23
23
  }
24
24
  }
25
- return to.concat(ar || from);
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
26
  };
27
27
  var __assign = (this && this.__assign) || function () {
28
28
  __assign = Object.assign || function(t) {
@@ -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.4";
72
- ts.version = ts.versionMajorMinor + ".1-insiders.20210811";
72
+ ts.version = "4.4.4";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -16439,6 +16439,10 @@ var ts;
16439
16439
  return false;
16440
16440
  }
16441
16441
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
16442
+ function isInfinityOrNaNString(name) {
16443
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
16444
+ }
16445
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
16442
16446
  })(ts || (ts = {}));
16443
16447
  var ts;
16444
16448
  (function (ts) {
@@ -21922,7 +21926,7 @@ var ts;
21922
21926
  name: "typescript:spreadArray",
21923
21927
  importName: "__spreadArray",
21924
21928
  scoped: false,
21925
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
21929
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
21926
21930
  };
21927
21931
  ts.valuesHelper = {
21928
21932
  name: "typescript:values",
@@ -58343,9 +58347,6 @@ var ts;
58343
58347
  function isNumericComputedName(name) {
58344
58348
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296);
58345
58349
  }
58346
- function isInfinityOrNaNString(name) {
58347
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
58348
- }
58349
58350
  function isNumericLiteralName(name) {
58350
58351
  return (+name).toString() === name;
58351
58352
  }
@@ -67453,7 +67454,7 @@ var ts;
67453
67454
  }
67454
67455
  else {
67455
67456
  var text = ts.getTextOfPropertyName(member.name);
67456
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
67457
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
67457
67458
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
67458
67459
  }
67459
67460
  }
@@ -67546,7 +67547,7 @@ var ts;
67546
67547
  return evaluate(expr.expression);
67547
67548
  case 79:
67548
67549
  var identifier = expr;
67549
- if (isInfinityOrNaNString(identifier.escapedText)) {
67550
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
67550
67551
  return +(identifier.escapedText);
67551
67552
  }
67552
67553
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -97525,6 +97526,10 @@ var ts;
97525
97526
  });
97526
97527
  parsedConfigs = undefined;
97527
97528
  }
97529
+ if (packageJsonMap) {
97530
+ ts.clearMap(packageJsonMap, ts.closeFileWatcher);
97531
+ packageJsonMap = undefined;
97532
+ }
97528
97533
  }
97529
97534
  function getCurrentBuilderProgram() {
97530
97535
  return builderProgram;
@@ -98524,11 +98529,11 @@ var ts;
98524
98529
  (_a = state.moduleResolutionCache) === null || _a === void 0 ? void 0 : _a.update(config.options);
98525
98530
  (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
98526
98531
  program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
98527
- state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
98528
- var path = _a[0], data = _a[1];
98529
- return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
98530
- }));
98531
98532
  if (state.watch) {
98533
+ state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
98534
+ var path = _a[0], data = _a[1];
98535
+ return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
98536
+ }));
98532
98537
  state.builderPrograms.set(projectPath, program);
98533
98538
  }
98534
98539
  step++;
package/lib/tsserver.js CHANGED
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
22
22
  ar[i] = from[i];
23
23
  }
24
24
  }
25
- return to.concat(ar || from);
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
26
  };
27
27
  var __assign = (this && this.__assign) || function () {
28
28
  __assign = Object.assign || function(t) {
@@ -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 + ".1-insiders.20210811";
103
+ ts.version = "4.4.4";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -20671,6 +20671,11 @@ var ts;
20671
20671
  return false;
20672
20672
  }
20673
20673
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
20674
+ /* @internal */
20675
+ function isInfinityOrNaNString(name) {
20676
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
20677
+ }
20678
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
20674
20679
  })(ts || (ts = {}));
20675
20680
  /* @internal */
20676
20681
  var ts;
@@ -27228,7 +27233,7 @@ var ts;
27228
27233
  name: "typescript:spreadArray",
27229
27234
  importName: "__spreadArray",
27230
27235
  scoped: false,
27231
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
27236
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
27232
27237
  };
27233
27238
  // ES2015 Destructuring Helpers
27234
27239
  ts.valuesHelper = {
@@ -69868,9 +69873,6 @@ var ts;
69868
69873
  // but this behavior is consistent with checkIndexedAccess
69869
69874
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
69870
69875
  }
69871
- function isInfinityOrNaNString(name) {
69872
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
69873
- }
69874
69876
  function isNumericLiteralName(name) {
69875
69877
  // The intent of numeric names is that
69876
69878
  // - they are names with text in a numeric form, and that
@@ -80543,7 +80545,7 @@ var ts;
80543
80545
  }
80544
80546
  else {
80545
80547
  var text = ts.getTextOfPropertyName(member.name);
80546
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
80548
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
80547
80549
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
80548
80550
  }
80549
80551
  }
@@ -80643,7 +80645,7 @@ var ts;
80643
80645
  return evaluate(expr.expression);
80644
80646
  case 79 /* Identifier */:
80645
80647
  var identifier = expr;
80646
- if (isInfinityOrNaNString(identifier.escapedText)) {
80648
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
80647
80649
  return +(identifier.escapedText);
80648
80650
  }
80649
80651
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -118025,6 +118027,10 @@ var ts;
118025
118027
  });
118026
118028
  parsedConfigs = undefined;
118027
118029
  }
118030
+ if (packageJsonMap) {
118031
+ ts.clearMap(packageJsonMap, ts.closeFileWatcher);
118032
+ packageJsonMap = undefined;
118033
+ }
118028
118034
  }
118029
118035
  function getCurrentBuilderProgram() {
118030
118036
  return builderProgram;
@@ -119117,11 +119123,11 @@ var ts;
119117
119123
  (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
119118
119124
  // Create program
119119
119125
  program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
119120
- state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119121
- var path = _a[0], data = _a[1];
119122
- return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
119123
- }));
119124
119126
  if (state.watch) {
119127
+ state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119128
+ var path = _a[0], data = _a[1];
119129
+ return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
119130
+ }));
119125
119131
  state.builderPrograms.set(projectPath, program);
119126
119132
  }
119127
119133
  step++;
@@ -124907,7 +124913,7 @@ var ts;
124907
124913
  if (ts.isJsxExpression(node)) {
124908
124914
  inJSXElement = false;
124909
124915
  }
124910
- if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
124916
+ if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
124911
124917
  var symbol = typeChecker.getSymbolAtLocation(node);
124912
124918
  if (symbol) {
124913
124919
  if (symbol.flags & 2097152 /* Alias */) {
@@ -125039,9 +125045,6 @@ var ts;
125039
125045
  function isRightSideOfQualifiedNameOrPropertyAccess(node) {
125040
125046
  return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
125041
125047
  }
125042
- function isInfinityOrNaNString(name) {
125043
- return name === "Infinity" || name === "NaN";
125044
- }
125045
125048
  var tokenFromDeclarationMapping = new ts.Map([
125046
125049
  [252 /* VariableDeclaration */, 7 /* variable */],
125047
125050
  [162 /* Parameter */, 6 /* parameter */],
@@ -126703,13 +126706,16 @@ var ts;
126703
126706
  case 204 /* PropertyAccessExpression */:
126704
126707
  propertyAccessToConvert = parent;
126705
126708
  node = propertyAccessToConvert.expression;
126706
- if ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
126707
- node.end === contextToken.pos &&
126708
- node.getChildCount(sourceFile) &&
126709
- ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */) {
126709
+ var leftmostAccessExpression = ts.getLeftmostAccessExpression(propertyAccessToConvert);
126710
+ if (ts.nodeIsMissing(leftmostAccessExpression) ||
126711
+ ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
126712
+ node.end === contextToken.pos &&
126713
+ node.getChildCount(sourceFile) &&
126714
+ ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */)) {
126710
126715
  // This is likely dot from incorrectly parsed expression and user is starting to write spread
126711
126716
  // eg: Math.min(./**/)
126712
126717
  // const x = function (./**/) {}
126718
+ // ({./**/})
126713
126719
  return undefined;
126714
126720
  }
126715
126721
  break;
@@ -137104,7 +137110,7 @@ var ts;
137104
137110
  for (var i = 0; i < args.length; ++i) {
137105
137111
  var originalArg = args[i];
137106
137112
  var arg = ts.skipParentheses(originalArg);
137107
- if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableExpression(arg)) {
137113
+ if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
137108
137114
  continue;
137109
137115
  }
137110
137116
  var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
@@ -137142,17 +137148,20 @@ var ts;
137142
137148
  var regex = leadingParameterNameCommentRegexFactory(name);
137143
137149
  return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
137144
137150
  }
137145
- function isHintableExpression(node) {
137151
+ function isHintableLiteral(node) {
137146
137152
  switch (node.kind) {
137147
- case 217 /* PrefixUnaryExpression */:
137148
- return ts.isLiteralExpression(node.operand);
137153
+ case 217 /* PrefixUnaryExpression */: {
137154
+ var operand = node.operand;
137155
+ return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
137156
+ }
137149
137157
  case 110 /* TrueKeyword */:
137150
137158
  case 95 /* FalseKeyword */:
137151
- case 212 /* ArrowFunction */:
137152
- case 211 /* FunctionExpression */:
137153
- case 203 /* ObjectLiteralExpression */:
137154
- case 202 /* ArrayLiteralExpression */:
137159
+ case 104 /* NullKeyword */:
137155
137160
  return true;
137161
+ case 79 /* Identifier */: {
137162
+ var name = node.escapedText;
137163
+ return isUndefined(name) || ts.isInfinityOrNaNString(name);
137164
+ }
137156
137165
  }
137157
137166
  return ts.isLiteralExpression(node);
137158
137167
  }
@@ -137232,6 +137241,9 @@ var ts;
137232
137241
  printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
137233
137242
  });
137234
137243
  }
137244
+ function isUndefined(name) {
137245
+ return name === "undefined";
137246
+ }
137235
137247
  }
137236
137248
  InlayHints.provideInlayHints = provideInlayHints;
137237
137249
  })(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
@@ -160088,12 +160100,6 @@ var ts;
160088
160100
  /** Completion was re-triggered as the current completion list is incomplete. */
160089
160101
  CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
160090
160102
  })(CompletionTriggerKind = protocol.CompletionTriggerKind || (protocol.CompletionTriggerKind = {}));
160091
- var InlayHintKind;
160092
- (function (InlayHintKind) {
160093
- InlayHintKind["Type"] = "Type";
160094
- InlayHintKind["Parameter"] = "Parameter";
160095
- InlayHintKind["Enum"] = "Enum";
160096
- })(InlayHintKind = protocol.InlayHintKind || (protocol.InlayHintKind = {}));
160097
160103
  var IndentStyle;
160098
160104
  (function (IndentStyle) {
160099
160105
  IndentStyle["None"] = "None";
@@ -5886,7 +5886,7 @@ declare namespace ts {
5886
5886
  interface InlayHint {
5887
5887
  text: string;
5888
5888
  position: number;
5889
- kind?: InlayHintKind;
5889
+ kind: InlayHintKind;
5890
5890
  whitespaceBefore?: boolean;
5891
5891
  whitespaceAfter?: boolean;
5892
5892
  }
@@ -8739,11 +8739,7 @@ declare namespace ts.server.protocol {
8739
8739
  interface SignatureHelpResponse extends Response {
8740
8740
  body?: SignatureHelpItems;
8741
8741
  }
8742
- enum InlayHintKind {
8743
- Type = "Type",
8744
- Parameter = "Parameter",
8745
- Enum = "Enum"
8746
- }
8742
+ type InlayHintKind = "Type" | "Parameter" | "Enum";
8747
8743
  interface InlayHintsRequestArgs extends FileRequestArgs {
8748
8744
  /**
8749
8745
  * Start position of the span.
@@ -8761,7 +8757,7 @@ declare namespace ts.server.protocol {
8761
8757
  interface InlayHintItem {
8762
8758
  text: string;
8763
8759
  position: Location;
8764
- kind?: InlayHintKind;
8760
+ kind: InlayHintKind;
8765
8761
  whitespaceBefore?: boolean;
8766
8762
  whitespaceAfter?: boolean;
8767
8763
  }
@@ -21,7 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
21
21
  ar[i] = from[i];
22
22
  }
23
23
  }
24
- return to.concat(ar || from);
24
+ return to.concat(ar || Array.prototype.slice.call(from));
25
25
  };
26
26
  var __assign = (this && this.__assign) || function () {
27
27
  __assign = Object.assign || function(t) {
@@ -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 + ".1-insiders.20210811";
297
+ ts.version = "4.4.4";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -20865,6 +20865,11 @@ var ts;
20865
20865
  return false;
20866
20866
  }
20867
20867
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
20868
+ /* @internal */
20869
+ function isInfinityOrNaNString(name) {
20870
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
20871
+ }
20872
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
20868
20873
  })(ts || (ts = {}));
20869
20874
  /* @internal */
20870
20875
  var ts;
@@ -27422,7 +27427,7 @@ var ts;
27422
27427
  name: "typescript:spreadArray",
27423
27428
  importName: "__spreadArray",
27424
27429
  scoped: false,
27425
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
27430
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
27426
27431
  };
27427
27432
  // ES2015 Destructuring Helpers
27428
27433
  ts.valuesHelper = {
@@ -70062,9 +70067,6 @@ var ts;
70062
70067
  // but this behavior is consistent with checkIndexedAccess
70063
70068
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
70064
70069
  }
70065
- function isInfinityOrNaNString(name) {
70066
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
70067
- }
70068
70070
  function isNumericLiteralName(name) {
70069
70071
  // The intent of numeric names is that
70070
70072
  // - they are names with text in a numeric form, and that
@@ -80737,7 +80739,7 @@ var ts;
80737
80739
  }
80738
80740
  else {
80739
80741
  var text = ts.getTextOfPropertyName(member.name);
80740
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
80742
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
80741
80743
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
80742
80744
  }
80743
80745
  }
@@ -80837,7 +80839,7 @@ var ts;
80837
80839
  return evaluate(expr.expression);
80838
80840
  case 79 /* Identifier */:
80839
80841
  var identifier = expr;
80840
- if (isInfinityOrNaNString(identifier.escapedText)) {
80842
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
80841
80843
  return +(identifier.escapedText);
80842
80844
  }
80843
80845
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -118219,6 +118221,10 @@ var ts;
118219
118221
  });
118220
118222
  parsedConfigs = undefined;
118221
118223
  }
118224
+ if (packageJsonMap) {
118225
+ ts.clearMap(packageJsonMap, ts.closeFileWatcher);
118226
+ packageJsonMap = undefined;
118227
+ }
118222
118228
  }
118223
118229
  function getCurrentBuilderProgram() {
118224
118230
  return builderProgram;
@@ -119311,11 +119317,11 @@ var ts;
119311
119317
  (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
119312
119318
  // Create program
119313
119319
  program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
119314
- state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119315
- var path = _a[0], data = _a[1];
119316
- return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
119317
- }));
119318
119320
  if (state.watch) {
119321
+ state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119322
+ var path = _a[0], data = _a[1];
119323
+ return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
119324
+ }));
119319
119325
  state.builderPrograms.set(projectPath, program);
119320
119326
  }
119321
119327
  step++;
@@ -125489,7 +125495,7 @@ var ts;
125489
125495
  if (ts.isJsxExpression(node)) {
125490
125496
  inJSXElement = false;
125491
125497
  }
125492
- if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
125498
+ if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
125493
125499
  var symbol = typeChecker.getSymbolAtLocation(node);
125494
125500
  if (symbol) {
125495
125501
  if (symbol.flags & 2097152 /* Alias */) {
@@ -125621,9 +125627,6 @@ var ts;
125621
125627
  function isRightSideOfQualifiedNameOrPropertyAccess(node) {
125622
125628
  return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
125623
125629
  }
125624
- function isInfinityOrNaNString(name) {
125625
- return name === "Infinity" || name === "NaN";
125626
- }
125627
125630
  var tokenFromDeclarationMapping = new ts.Map([
125628
125631
  [252 /* VariableDeclaration */, 7 /* variable */],
125629
125632
  [162 /* Parameter */, 6 /* parameter */],
@@ -127285,13 +127288,16 @@ var ts;
127285
127288
  case 204 /* PropertyAccessExpression */:
127286
127289
  propertyAccessToConvert = parent;
127287
127290
  node = propertyAccessToConvert.expression;
127288
- if ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
127289
- node.end === contextToken.pos &&
127290
- node.getChildCount(sourceFile) &&
127291
- ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */) {
127291
+ var leftmostAccessExpression = ts.getLeftmostAccessExpression(propertyAccessToConvert);
127292
+ if (ts.nodeIsMissing(leftmostAccessExpression) ||
127293
+ ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
127294
+ node.end === contextToken.pos &&
127295
+ node.getChildCount(sourceFile) &&
127296
+ ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */)) {
127292
127297
  // This is likely dot from incorrectly parsed expression and user is starting to write spread
127293
127298
  // eg: Math.min(./**/)
127294
127299
  // const x = function (./**/) {}
127300
+ // ({./**/})
127295
127301
  return undefined;
127296
127302
  }
127297
127303
  break;
@@ -137686,7 +137692,7 @@ var ts;
137686
137692
  for (var i = 0; i < args.length; ++i) {
137687
137693
  var originalArg = args[i];
137688
137694
  var arg = ts.skipParentheses(originalArg);
137689
- if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableExpression(arg)) {
137695
+ if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
137690
137696
  continue;
137691
137697
  }
137692
137698
  var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
@@ -137724,17 +137730,20 @@ var ts;
137724
137730
  var regex = leadingParameterNameCommentRegexFactory(name);
137725
137731
  return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
137726
137732
  }
137727
- function isHintableExpression(node) {
137733
+ function isHintableLiteral(node) {
137728
137734
  switch (node.kind) {
137729
- case 217 /* PrefixUnaryExpression */:
137730
- return ts.isLiteralExpression(node.operand);
137735
+ case 217 /* PrefixUnaryExpression */: {
137736
+ var operand = node.operand;
137737
+ return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
137738
+ }
137731
137739
  case 110 /* TrueKeyword */:
137732
137740
  case 95 /* FalseKeyword */:
137733
- case 212 /* ArrowFunction */:
137734
- case 211 /* FunctionExpression */:
137735
- case 203 /* ObjectLiteralExpression */:
137736
- case 202 /* ArrayLiteralExpression */:
137741
+ case 104 /* NullKeyword */:
137737
137742
  return true;
137743
+ case 79 /* Identifier */: {
137744
+ var name = node.escapedText;
137745
+ return isUndefined(name) || ts.isInfinityOrNaNString(name);
137746
+ }
137738
137747
  }
137739
137748
  return ts.isLiteralExpression(node);
137740
137749
  }
@@ -137814,6 +137823,9 @@ var ts;
137814
137823
  printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
137815
137824
  });
137816
137825
  }
137826
+ function isUndefined(name) {
137827
+ return name === "undefined";
137828
+ }
137817
137829
  }
137818
137830
  InlayHints.provideInlayHints = provideInlayHints;
137819
137831
  })(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
@@ -160282,12 +160294,6 @@ var ts;
160282
160294
  /** Completion was re-triggered as the current completion list is incomplete. */
160283
160295
  CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
160284
160296
  })(CompletionTriggerKind = protocol.CompletionTriggerKind || (protocol.CompletionTriggerKind = {}));
160285
- var InlayHintKind;
160286
- (function (InlayHintKind) {
160287
- InlayHintKind["Type"] = "Type";
160288
- InlayHintKind["Parameter"] = "Parameter";
160289
- InlayHintKind["Enum"] = "Enum";
160290
- })(InlayHintKind = protocol.InlayHintKind || (protocol.InlayHintKind = {}));
160291
160297
  var IndentStyle;
160292
160298
  (function (IndentStyle) {
160293
160299
  IndentStyle["None"] = "None";
@@ -5886,7 +5886,7 @@ declare namespace ts {
5886
5886
  interface InlayHint {
5887
5887
  text: string;
5888
5888
  position: number;
5889
- kind?: InlayHintKind;
5889
+ kind: InlayHintKind;
5890
5890
  whitespaceBefore?: boolean;
5891
5891
  whitespaceAfter?: boolean;
5892
5892
  }
package/lib/typescript.js CHANGED
@@ -21,7 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
21
21
  ar[i] = from[i];
22
22
  }
23
23
  }
24
- return to.concat(ar || from);
24
+ return to.concat(ar || Array.prototype.slice.call(from));
25
25
  };
26
26
  var __assign = (this && this.__assign) || function () {
27
27
  __assign = Object.assign || function(t) {
@@ -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 + ".1-insiders.20210811";
297
+ ts.version = "4.4.4";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -20865,6 +20865,11 @@ var ts;
20865
20865
  return false;
20866
20866
  }
20867
20867
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
20868
+ /* @internal */
20869
+ function isInfinityOrNaNString(name) {
20870
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
20871
+ }
20872
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
20868
20873
  })(ts || (ts = {}));
20869
20874
  /* @internal */
20870
20875
  var ts;
@@ -27422,7 +27427,7 @@ var ts;
27422
27427
  name: "typescript:spreadArray",
27423
27428
  importName: "__spreadArray",
27424
27429
  scoped: false,
27425
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
27430
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
27426
27431
  };
27427
27432
  // ES2015 Destructuring Helpers
27428
27433
  ts.valuesHelper = {
@@ -70062,9 +70067,6 @@ var ts;
70062
70067
  // but this behavior is consistent with checkIndexedAccess
70063
70068
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
70064
70069
  }
70065
- function isInfinityOrNaNString(name) {
70066
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
70067
- }
70068
70070
  function isNumericLiteralName(name) {
70069
70071
  // The intent of numeric names is that
70070
70072
  // - they are names with text in a numeric form, and that
@@ -80737,7 +80739,7 @@ var ts;
80737
80739
  }
80738
80740
  else {
80739
80741
  var text = ts.getTextOfPropertyName(member.name);
80740
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
80742
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
80741
80743
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
80742
80744
  }
80743
80745
  }
@@ -80837,7 +80839,7 @@ var ts;
80837
80839
  return evaluate(expr.expression);
80838
80840
  case 79 /* Identifier */:
80839
80841
  var identifier = expr;
80840
- if (isInfinityOrNaNString(identifier.escapedText)) {
80842
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
80841
80843
  return +(identifier.escapedText);
80842
80844
  }
80843
80845
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -118219,6 +118221,10 @@ var ts;
118219
118221
  });
118220
118222
  parsedConfigs = undefined;
118221
118223
  }
118224
+ if (packageJsonMap) {
118225
+ ts.clearMap(packageJsonMap, ts.closeFileWatcher);
118226
+ packageJsonMap = undefined;
118227
+ }
118222
118228
  }
118223
118229
  function getCurrentBuilderProgram() {
118224
118230
  return builderProgram;
@@ -119311,11 +119317,11 @@ var ts;
119311
119317
  (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
119312
119318
  // Create program
119313
119319
  program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
119314
- state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119315
- var path = _a[0], data = _a[1];
119316
- return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
119317
- }));
119318
119320
  if (state.watch) {
119321
+ state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119322
+ var path = _a[0], data = _a[1];
119323
+ return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
119324
+ }));
119319
119325
  state.builderPrograms.set(projectPath, program);
119320
119326
  }
119321
119327
  step++;
@@ -125489,7 +125495,7 @@ var ts;
125489
125495
  if (ts.isJsxExpression(node)) {
125490
125496
  inJSXElement = false;
125491
125497
  }
125492
- if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
125498
+ if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
125493
125499
  var symbol = typeChecker.getSymbolAtLocation(node);
125494
125500
  if (symbol) {
125495
125501
  if (symbol.flags & 2097152 /* Alias */) {
@@ -125621,9 +125627,6 @@ var ts;
125621
125627
  function isRightSideOfQualifiedNameOrPropertyAccess(node) {
125622
125628
  return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
125623
125629
  }
125624
- function isInfinityOrNaNString(name) {
125625
- return name === "Infinity" || name === "NaN";
125626
- }
125627
125630
  var tokenFromDeclarationMapping = new ts.Map([
125628
125631
  [252 /* VariableDeclaration */, 7 /* variable */],
125629
125632
  [162 /* Parameter */, 6 /* parameter */],
@@ -127285,13 +127288,16 @@ var ts;
127285
127288
  case 204 /* PropertyAccessExpression */:
127286
127289
  propertyAccessToConvert = parent;
127287
127290
  node = propertyAccessToConvert.expression;
127288
- if ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
127289
- node.end === contextToken.pos &&
127290
- node.getChildCount(sourceFile) &&
127291
- ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */) {
127291
+ var leftmostAccessExpression = ts.getLeftmostAccessExpression(propertyAccessToConvert);
127292
+ if (ts.nodeIsMissing(leftmostAccessExpression) ||
127293
+ ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
127294
+ node.end === contextToken.pos &&
127295
+ node.getChildCount(sourceFile) &&
127296
+ ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */)) {
127292
127297
  // This is likely dot from incorrectly parsed expression and user is starting to write spread
127293
127298
  // eg: Math.min(./**/)
127294
127299
  // const x = function (./**/) {}
127300
+ // ({./**/})
127295
127301
  return undefined;
127296
127302
  }
127297
127303
  break;
@@ -137686,7 +137692,7 @@ var ts;
137686
137692
  for (var i = 0; i < args.length; ++i) {
137687
137693
  var originalArg = args[i];
137688
137694
  var arg = ts.skipParentheses(originalArg);
137689
- if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableExpression(arg)) {
137695
+ if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
137690
137696
  continue;
137691
137697
  }
137692
137698
  var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
@@ -137724,17 +137730,20 @@ var ts;
137724
137730
  var regex = leadingParameterNameCommentRegexFactory(name);
137725
137731
  return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
137726
137732
  }
137727
- function isHintableExpression(node) {
137733
+ function isHintableLiteral(node) {
137728
137734
  switch (node.kind) {
137729
- case 217 /* PrefixUnaryExpression */:
137730
- return ts.isLiteralExpression(node.operand);
137735
+ case 217 /* PrefixUnaryExpression */: {
137736
+ var operand = node.operand;
137737
+ return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
137738
+ }
137731
137739
  case 110 /* TrueKeyword */:
137732
137740
  case 95 /* FalseKeyword */:
137733
- case 212 /* ArrowFunction */:
137734
- case 211 /* FunctionExpression */:
137735
- case 203 /* ObjectLiteralExpression */:
137736
- case 202 /* ArrayLiteralExpression */:
137741
+ case 104 /* NullKeyword */:
137737
137742
  return true;
137743
+ case 79 /* Identifier */: {
137744
+ var name = node.escapedText;
137745
+ return isUndefined(name) || ts.isInfinityOrNaNString(name);
137746
+ }
137738
137747
  }
137739
137748
  return ts.isLiteralExpression(node);
137740
137749
  }
@@ -137814,6 +137823,9 @@ var ts;
137814
137823
  printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
137815
137824
  });
137816
137825
  }
137826
+ function isUndefined(name) {
137827
+ return name === "undefined";
137828
+ }
137817
137829
  }
137818
137830
  InlayHints.provideInlayHints = provideInlayHints;
137819
137831
  })(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
@@ -5886,7 +5886,7 @@ declare namespace ts {
5886
5886
  interface InlayHint {
5887
5887
  text: string;
5888
5888
  position: number;
5889
- kind?: InlayHintKind;
5889
+ kind: InlayHintKind;
5890
5890
  whitespaceBefore?: boolean;
5891
5891
  whitespaceAfter?: boolean;
5892
5892
  }
@@ -21,7 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
21
21
  ar[i] = from[i];
22
22
  }
23
23
  }
24
- return to.concat(ar || from);
24
+ return to.concat(ar || Array.prototype.slice.call(from));
25
25
  };
26
26
  var __assign = (this && this.__assign) || function () {
27
27
  __assign = Object.assign || function(t) {
@@ -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 + ".1-insiders.20210811";
297
+ ts.version = "4.4.4";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -20865,6 +20865,11 @@ var ts;
20865
20865
  return false;
20866
20866
  }
20867
20867
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
20868
+ /* @internal */
20869
+ function isInfinityOrNaNString(name) {
20870
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
20871
+ }
20872
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
20868
20873
  })(ts || (ts = {}));
20869
20874
  /* @internal */
20870
20875
  var ts;
@@ -27422,7 +27427,7 @@ var ts;
27422
27427
  name: "typescript:spreadArray",
27423
27428
  importName: "__spreadArray",
27424
27429
  scoped: false,
27425
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
27430
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
27426
27431
  };
27427
27432
  // ES2015 Destructuring Helpers
27428
27433
  ts.valuesHelper = {
@@ -70062,9 +70067,6 @@ var ts;
70062
70067
  // but this behavior is consistent with checkIndexedAccess
70063
70068
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
70064
70069
  }
70065
- function isInfinityOrNaNString(name) {
70066
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
70067
- }
70068
70070
  function isNumericLiteralName(name) {
70069
70071
  // The intent of numeric names is that
70070
70072
  // - they are names with text in a numeric form, and that
@@ -80737,7 +80739,7 @@ var ts;
80737
80739
  }
80738
80740
  else {
80739
80741
  var text = ts.getTextOfPropertyName(member.name);
80740
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
80742
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
80741
80743
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
80742
80744
  }
80743
80745
  }
@@ -80837,7 +80839,7 @@ var ts;
80837
80839
  return evaluate(expr.expression);
80838
80840
  case 79 /* Identifier */:
80839
80841
  var identifier = expr;
80840
- if (isInfinityOrNaNString(identifier.escapedText)) {
80842
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
80841
80843
  return +(identifier.escapedText);
80842
80844
  }
80843
80845
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -118219,6 +118221,10 @@ var ts;
118219
118221
  });
118220
118222
  parsedConfigs = undefined;
118221
118223
  }
118224
+ if (packageJsonMap) {
118225
+ ts.clearMap(packageJsonMap, ts.closeFileWatcher);
118226
+ packageJsonMap = undefined;
118227
+ }
118222
118228
  }
118223
118229
  function getCurrentBuilderProgram() {
118224
118230
  return builderProgram;
@@ -119311,11 +119317,11 @@ var ts;
119311
119317
  (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
119312
119318
  // Create program
119313
119319
  program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
119314
- state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119315
- var path = _a[0], data = _a[1];
119316
- return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
119317
- }));
119318
119320
  if (state.watch) {
119321
+ state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119322
+ var path = _a[0], data = _a[1];
119323
+ return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
119324
+ }));
119319
119325
  state.builderPrograms.set(projectPath, program);
119320
119326
  }
119321
119327
  step++;
@@ -125489,7 +125495,7 @@ var ts;
125489
125495
  if (ts.isJsxExpression(node)) {
125490
125496
  inJSXElement = false;
125491
125497
  }
125492
- if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
125498
+ if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
125493
125499
  var symbol = typeChecker.getSymbolAtLocation(node);
125494
125500
  if (symbol) {
125495
125501
  if (symbol.flags & 2097152 /* Alias */) {
@@ -125621,9 +125627,6 @@ var ts;
125621
125627
  function isRightSideOfQualifiedNameOrPropertyAccess(node) {
125622
125628
  return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
125623
125629
  }
125624
- function isInfinityOrNaNString(name) {
125625
- return name === "Infinity" || name === "NaN";
125626
- }
125627
125630
  var tokenFromDeclarationMapping = new ts.Map([
125628
125631
  [252 /* VariableDeclaration */, 7 /* variable */],
125629
125632
  [162 /* Parameter */, 6 /* parameter */],
@@ -127285,13 +127288,16 @@ var ts;
127285
127288
  case 204 /* PropertyAccessExpression */:
127286
127289
  propertyAccessToConvert = parent;
127287
127290
  node = propertyAccessToConvert.expression;
127288
- if ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
127289
- node.end === contextToken.pos &&
127290
- node.getChildCount(sourceFile) &&
127291
- ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */) {
127291
+ var leftmostAccessExpression = ts.getLeftmostAccessExpression(propertyAccessToConvert);
127292
+ if (ts.nodeIsMissing(leftmostAccessExpression) ||
127293
+ ((ts.isCallExpression(node) || ts.isFunctionLike(node)) &&
127294
+ node.end === contextToken.pos &&
127295
+ node.getChildCount(sourceFile) &&
127296
+ ts.last(node.getChildren(sourceFile)).kind !== 21 /* CloseParenToken */)) {
127292
127297
  // This is likely dot from incorrectly parsed expression and user is starting to write spread
127293
127298
  // eg: Math.min(./**/)
127294
127299
  // const x = function (./**/) {}
127300
+ // ({./**/})
127295
127301
  return undefined;
127296
127302
  }
127297
127303
  break;
@@ -137686,7 +137692,7 @@ var ts;
137686
137692
  for (var i = 0; i < args.length; ++i) {
137687
137693
  var originalArg = args[i];
137688
137694
  var arg = ts.skipParentheses(originalArg);
137689
- if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableExpression(arg)) {
137695
+ if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
137690
137696
  continue;
137691
137697
  }
137692
137698
  var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
@@ -137724,17 +137730,20 @@ var ts;
137724
137730
  var regex = leadingParameterNameCommentRegexFactory(name);
137725
137731
  return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
137726
137732
  }
137727
- function isHintableExpression(node) {
137733
+ function isHintableLiteral(node) {
137728
137734
  switch (node.kind) {
137729
- case 217 /* PrefixUnaryExpression */:
137730
- return ts.isLiteralExpression(node.operand);
137735
+ case 217 /* PrefixUnaryExpression */: {
137736
+ var operand = node.operand;
137737
+ return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
137738
+ }
137731
137739
  case 110 /* TrueKeyword */:
137732
137740
  case 95 /* FalseKeyword */:
137733
- case 212 /* ArrowFunction */:
137734
- case 211 /* FunctionExpression */:
137735
- case 203 /* ObjectLiteralExpression */:
137736
- case 202 /* ArrayLiteralExpression */:
137741
+ case 104 /* NullKeyword */:
137737
137742
  return true;
137743
+ case 79 /* Identifier */: {
137744
+ var name = node.escapedText;
137745
+ return isUndefined(name) || ts.isInfinityOrNaNString(name);
137746
+ }
137738
137747
  }
137739
137748
  return ts.isLiteralExpression(node);
137740
137749
  }
@@ -137814,6 +137823,9 @@ var ts;
137814
137823
  printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
137815
137824
  });
137816
137825
  }
137826
+ function isUndefined(name) {
137827
+ return name === "undefined";
137828
+ }
137817
137829
  }
137818
137830
  InlayHints.provideInlayHints = provideInlayHints;
137819
137831
  })(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
22
22
  ar[i] = from[i];
23
23
  }
24
24
  }
25
- return to.concat(ar || from);
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
26
  };
27
27
  var __assign = (this && this.__assign) || function () {
28
28
  __assign = Object.assign || function(t) {
@@ -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 + ".1-insiders.20210811";
92
+ ts.version = "4.4.4";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -20660,6 +20660,11 @@ var ts;
20660
20660
  return false;
20661
20661
  }
20662
20662
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
20663
+ /* @internal */
20664
+ function isInfinityOrNaNString(name) {
20665
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
20666
+ }
20667
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
20663
20668
  })(ts || (ts = {}));
20664
20669
  /* @internal */
20665
20670
  var ts;
@@ -27217,7 +27222,7 @@ var ts;
27217
27222
  name: "typescript:spreadArray",
27218
27223
  importName: "__spreadArray",
27219
27224
  scoped: false,
27220
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
27225
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
27221
27226
  };
27222
27227
  // ES2015 Destructuring Helpers
27223
27228
  ts.valuesHelper = {
@@ -69857,9 +69862,6 @@ var ts;
69857
69862
  // but this behavior is consistent with checkIndexedAccess
69858
69863
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
69859
69864
  }
69860
- function isInfinityOrNaNString(name) {
69861
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
69862
- }
69863
69865
  function isNumericLiteralName(name) {
69864
69866
  // The intent of numeric names is that
69865
69867
  // - they are names with text in a numeric form, and that
@@ -80532,7 +80534,7 @@ var ts;
80532
80534
  }
80533
80535
  else {
80534
80536
  var text = ts.getTextOfPropertyName(member.name);
80535
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
80537
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
80536
80538
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
80537
80539
  }
80538
80540
  }
@@ -80632,7 +80634,7 @@ var ts;
80632
80634
  return evaluate(expr.expression);
80633
80635
  case 79 /* Identifier */:
80634
80636
  var identifier = expr;
80635
- if (isInfinityOrNaNString(identifier.escapedText)) {
80637
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
80636
80638
  return +(identifier.escapedText);
80637
80639
  }
80638
80640
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -118014,6 +118016,10 @@ var ts;
118014
118016
  });
118015
118017
  parsedConfigs = undefined;
118016
118018
  }
118019
+ if (packageJsonMap) {
118020
+ ts.clearMap(packageJsonMap, ts.closeFileWatcher);
118021
+ packageJsonMap = undefined;
118022
+ }
118017
118023
  }
118018
118024
  function getCurrentBuilderProgram() {
118019
118025
  return builderProgram;
@@ -119106,11 +119112,11 @@ var ts;
119106
119112
  (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
119107
119113
  // Create program
119108
119114
  program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
119109
- state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119110
- var path = _a[0], data = _a[1];
119111
- return [state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data];
119112
- }));
119113
119115
  if (state.watch) {
119116
+ state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
119117
+ var path = _a[0], data = _a[1];
119118
+ return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
119119
+ }));
119114
119120
  state.builderPrograms.set(projectPath, program);
119115
119121
  }
119116
119122
  step++;
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.4.1-insiders.20210811",
5
+ "version": "4.4.4",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -130,4 +130,4 @@
130
130
  "volta": {
131
131
  "node": "14.15.5"
132
132
  }
133
- }
133
+ }