typescript 4.9.0-dev.20221031 → 4.9.2-rc

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
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
48
- while (_) try {
48
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
49
49
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
50
50
  if (y = 0, t) op = [op[0] & 2, t.value];
51
51
  switch (op[0]) {
@@ -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.20221031");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".2-rc");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -98124,14 +98124,16 @@ var ts;
98124
98124
  }
98125
98125
  return setReadFileCache(key, fileName);
98126
98126
  };
98127
- var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
98127
+ var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
98128
98128
  var key = toPath(fileName);
98129
- var value = sourceFileCache.get(key);
98129
+ var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
98130
+ var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
98131
+ var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
98130
98132
  if (value)
98131
98133
  return value;
98132
- var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
98134
+ var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
98133
98135
  if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json"))) {
98134
- sourceFileCache.set(key, sourceFile);
98136
+ sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
98135
98137
  }
98136
98138
  return sourceFile;
98137
98139
  } : undefined;
@@ -98155,13 +98157,15 @@ var ts;
98155
98157
  var value = readFileCache.get(key);
98156
98158
  if (value !== undefined && value !== data) {
98157
98159
  readFileCache.delete(key);
98158
- sourceFileCache.delete(key);
98160
+ sourceFileCache.forEach(function (map) { return map.delete(key); });
98159
98161
  }
98160
98162
  else if (getSourceFileWithCache) {
98161
- var sourceFile = sourceFileCache.get(key);
98162
- if (sourceFile && sourceFile.text !== data) {
98163
- sourceFileCache.delete(key);
98164
- }
98163
+ sourceFileCache.forEach(function (map) {
98164
+ var sourceFile = map.get(key);
98165
+ if (sourceFile && sourceFile.text !== data) {
98166
+ map.delete(key);
98167
+ }
98168
+ });
98165
98169
  }
98166
98170
  originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
98167
98171
  };
package/lib/tsserver.js CHANGED
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
48
- while (_) try {
48
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
49
49
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
50
50
  if (y = 0, t) op = [op[0] & 2, t.value];
51
51
  switch (op[0]) {
@@ -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.20221031");
112
+ ts.version = "".concat(ts.versionMajorMinor, ".2-rc");
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -118604,14 +118604,16 @@ var ts;
118604
118604
  }
118605
118605
  return setReadFileCache(key, fileName);
118606
118606
  };
118607
- var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118607
+ var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118608
118608
  var key = toPath(fileName);
118609
- var value = sourceFileCache.get(key);
118609
+ var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118610
+ var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118611
+ var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118610
118612
  if (value)
118611
118613
  return value;
118612
- var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118614
+ var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118613
118615
  if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118614
- sourceFileCache.set(key, sourceFile);
118616
+ sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118615
118617
  }
118616
118618
  return sourceFile;
118617
118619
  } : undefined;
@@ -118636,13 +118638,15 @@ var ts;
118636
118638
  var value = readFileCache.get(key);
118637
118639
  if (value !== undefined && value !== data) {
118638
118640
  readFileCache.delete(key);
118639
- sourceFileCache.delete(key);
118641
+ sourceFileCache.forEach(function (map) { return map.delete(key); });
118640
118642
  }
118641
118643
  else if (getSourceFileWithCache) {
118642
- var sourceFile = sourceFileCache.get(key);
118643
- if (sourceFile && sourceFile.text !== data) {
118644
- sourceFileCache.delete(key);
118645
- }
118644
+ sourceFileCache.forEach(function (map) {
118645
+ var sourceFile = map.get(key);
118646
+ if (sourceFile && sourceFile.text !== data) {
118647
+ map.delete(key);
118648
+ }
118649
+ });
118646
118650
  }
118647
118651
  originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118648
118652
  };
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
44
44
  function verb(n) { return function (v) { return step([n, v]); }; }
45
45
  function step(op) {
46
46
  if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
47
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
48
48
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49
49
  if (y = 0, t) op = [op[0] & 2, t.value];
50
50
  switch (op[0]) {
@@ -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.20221031");
111
+ ts.version = "".concat(ts.versionMajorMinor, ".2-rc");
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -118603,14 +118603,16 @@ var ts;
118603
118603
  }
118604
118604
  return setReadFileCache(key, fileName);
118605
118605
  };
118606
- var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118606
+ var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118607
118607
  var key = toPath(fileName);
118608
- var value = sourceFileCache.get(key);
118608
+ var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118609
+ var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118610
+ var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118609
118611
  if (value)
118610
118612
  return value;
118611
- var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118613
+ var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118612
118614
  if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118613
- sourceFileCache.set(key, sourceFile);
118615
+ sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118614
118616
  }
118615
118617
  return sourceFile;
118616
118618
  } : undefined;
@@ -118635,13 +118637,15 @@ var ts;
118635
118637
  var value = readFileCache.get(key);
118636
118638
  if (value !== undefined && value !== data) {
118637
118639
  readFileCache.delete(key);
118638
- sourceFileCache.delete(key);
118640
+ sourceFileCache.forEach(function (map) { return map.delete(key); });
118639
118641
  }
118640
118642
  else if (getSourceFileWithCache) {
118641
- var sourceFile = sourceFileCache.get(key);
118642
- if (sourceFile && sourceFile.text !== data) {
118643
- sourceFileCache.delete(key);
118644
- }
118643
+ sourceFileCache.forEach(function (map) {
118644
+ var sourceFile = map.get(key);
118645
+ if (sourceFile && sourceFile.text !== data) {
118646
+ map.delete(key);
118647
+ }
118648
+ });
118645
118649
  }
118646
118650
  originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118647
118651
  };
package/lib/typescript.js CHANGED
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
44
44
  function verb(n) { return function (v) { return step([n, v]); }; }
45
45
  function step(op) {
46
46
  if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
47
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
48
48
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49
49
  if (y = 0, t) op = [op[0] & 2, t.value];
50
50
  switch (op[0]) {
@@ -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.20221031");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".2-rc");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -118594,14 +118594,16 @@ var ts;
118594
118594
  }
118595
118595
  return setReadFileCache(key, fileName);
118596
118596
  };
118597
- var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118597
+ var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118598
118598
  var key = toPath(fileName);
118599
- var value = sourceFileCache.get(key);
118599
+ var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118600
+ var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118601
+ var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118600
118602
  if (value)
118601
118603
  return value;
118602
- var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118604
+ var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118603
118605
  if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118604
- sourceFileCache.set(key, sourceFile);
118606
+ sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118605
118607
  }
118606
118608
  return sourceFile;
118607
118609
  } : undefined;
@@ -118626,13 +118628,15 @@ var ts;
118626
118628
  var value = readFileCache.get(key);
118627
118629
  if (value !== undefined && value !== data) {
118628
118630
  readFileCache.delete(key);
118629
- sourceFileCache.delete(key);
118631
+ sourceFileCache.forEach(function (map) { return map.delete(key); });
118630
118632
  }
118631
118633
  else if (getSourceFileWithCache) {
118632
- var sourceFile = sourceFileCache.get(key);
118633
- if (sourceFile && sourceFile.text !== data) {
118634
- sourceFileCache.delete(key);
118635
- }
118634
+ sourceFileCache.forEach(function (map) {
118635
+ var sourceFile = map.get(key);
118636
+ if (sourceFile && sourceFile.text !== data) {
118637
+ map.delete(key);
118638
+ }
118639
+ });
118636
118640
  }
118637
118641
  originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118638
118642
  };
@@ -44,7 +44,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
44
44
  function verb(n) { return function (v) { return step([n, v]); }; }
45
45
  function step(op) {
46
46
  if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
47
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
48
48
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49
49
  if (y = 0, t) op = [op[0] & 2, t.value];
50
50
  switch (op[0]) {
@@ -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.20221031");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".2-rc");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -118594,14 +118594,16 @@ var ts;
118594
118594
  }
118595
118595
  return setReadFileCache(key, fileName);
118596
118596
  };
118597
- var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118597
+ var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118598
118598
  var key = toPath(fileName);
118599
- var value = sourceFileCache.get(key);
118599
+ var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118600
+ var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118601
+ var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118600
118602
  if (value)
118601
118603
  return value;
118602
- var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118604
+ var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118603
118605
  if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118604
- sourceFileCache.set(key, sourceFile);
118606
+ sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118605
118607
  }
118606
118608
  return sourceFile;
118607
118609
  } : undefined;
@@ -118626,13 +118628,15 @@ var ts;
118626
118628
  var value = readFileCache.get(key);
118627
118629
  if (value !== undefined && value !== data) {
118628
118630
  readFileCache.delete(key);
118629
- sourceFileCache.delete(key);
118631
+ sourceFileCache.forEach(function (map) { return map.delete(key); });
118630
118632
  }
118631
118633
  else if (getSourceFileWithCache) {
118632
- var sourceFile = sourceFileCache.get(key);
118633
- if (sourceFile && sourceFile.text !== data) {
118634
- sourceFileCache.delete(key);
118635
- }
118634
+ sourceFileCache.forEach(function (map) {
118635
+ var sourceFile = map.get(key);
118636
+ if (sourceFile && sourceFile.text !== data) {
118637
+ map.delete(key);
118638
+ }
118639
+ });
118636
118640
  }
118637
118641
  originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118638
118642
  };
@@ -45,7 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
48
- while (_) try {
48
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
49
49
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
50
50
  if (y = 0, t) op = [op[0] & 2, t.value];
51
51
  switch (op[0]) {
@@ -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.20221031");
92
+ ts.version = "".concat(ts.versionMajorMinor, ".2-rc");
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -118584,14 +118584,16 @@ var ts;
118584
118584
  }
118585
118585
  return setReadFileCache(key, fileName);
118586
118586
  };
118587
- var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
118587
+ var getSourceFileWithCache = getSourceFile ? function (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
118588
118588
  var key = toPath(fileName);
118589
- var value = sourceFileCache.get(key);
118589
+ var impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined;
118590
+ var forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
118591
+ var value = forImpliedNodeFormat === null || forImpliedNodeFormat === void 0 ? void 0 : forImpliedNodeFormat.get(key);
118590
118592
  if (value)
118591
118593
  return value;
118592
- var sourceFile = getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
118594
+ var sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
118593
118595
  if (sourceFile && (ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json" /* Extension.Json */))) {
118594
- sourceFileCache.set(key, sourceFile);
118596
+ sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || new ts.Map()).set(key, sourceFile));
118595
118597
  }
118596
118598
  return sourceFile;
118597
118599
  } : undefined;
@@ -118616,13 +118618,15 @@ var ts;
118616
118618
  var value = readFileCache.get(key);
118617
118619
  if (value !== undefined && value !== data) {
118618
118620
  readFileCache.delete(key);
118619
- sourceFileCache.delete(key);
118621
+ sourceFileCache.forEach(function (map) { return map.delete(key); });
118620
118622
  }
118621
118623
  else if (getSourceFileWithCache) {
118622
- var sourceFile = sourceFileCache.get(key);
118623
- if (sourceFile && sourceFile.text !== data) {
118624
- sourceFileCache.delete(key);
118625
- }
118624
+ sourceFileCache.forEach(function (map) {
118625
+ var sourceFile = map.get(key);
118626
+ if (sourceFile && sourceFile.text !== data) {
118627
+ map.delete(key);
118628
+ }
118629
+ });
118626
118630
  }
118627
118631
  originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
118628
118632
  };
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.20221031",
5
+ "version": "4.9.2-rc",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [