typescript 4.9.0-dev.20221003 → 4.9.0-dev.20221005

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.es5.d.ts CHANGED
@@ -931,6 +931,7 @@ interface DateConstructor {
931
931
  * @param ms A number from 0 to 999 that specifies the milliseconds.
932
932
  */
933
933
  UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
934
+ /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */
934
935
  now(): number;
935
936
  }
936
937
 
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.20221003");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221005");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -4222,7 +4222,7 @@ var ts;
4222
4222
  };
4223
4223
  }
4224
4224
  function createSystemWatchFunctions(_a) {
4225
- var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
4225
+ var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
4226
4226
  var pollingWatches = new ts.Map();
4227
4227
  var fsWatches = new ts.Map();
4228
4228
  var fsWatchesRecursive = new ts.Map();
@@ -4281,7 +4281,7 @@ var ts;
4281
4281
  default:
4282
4282
  return useNonPollingWatchers ?
4283
4283
  generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
4284
- { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
4284
+ { watchFile: ts.WatchFileKind.UseFsEvents };
4285
4285
  }
4286
4286
  }
4287
4287
  function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -4504,7 +4504,6 @@ var ts;
4504
4504
  tscWatchFile: process.env.TSC_WATCHFILE,
4505
4505
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
4506
4506
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
4507
- defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
4508
4507
  inodeWatching: isLinuxOrMacOs,
4509
4508
  sysLog: sysLog,
4510
4509
  }), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
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.20221003");
112
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221005");
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -6755,7 +6755,7 @@ var ts;
6755
6755
  }
6756
6756
  /*@internal*/
6757
6757
  function createSystemWatchFunctions(_a) {
6758
- var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6758
+ var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6759
6759
  var pollingWatches = new ts.Map();
6760
6760
  var fsWatches = new ts.Map();
6761
6761
  var fsWatchesRecursive = new ts.Map();
@@ -6821,8 +6821,8 @@ var ts;
6821
6821
  return useNonPollingWatchers ?
6822
6822
  // Use notifications from FS to watch with falling back to fs.watchFile
6823
6823
  generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
6824
- // Default to do not use fixed polling interval
6825
- { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
6824
+ // Default to using fs events
6825
+ { watchFile: ts.WatchFileKind.UseFsEvents };
6826
6826
  }
6827
6827
  }
6828
6828
  function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -7094,7 +7094,6 @@ var ts;
7094
7094
  tscWatchFile: process.env.TSC_WATCHFILE,
7095
7095
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
7096
7096
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
7097
- defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
7098
7097
  inodeWatching: isLinuxOrMacOs,
7099
7098
  sysLog: sysLog,
7100
7099
  }), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
@@ -129921,6 +129920,8 @@ var ts;
129921
129920
  return lastTypeNode;
129922
129921
  }
129923
129922
  function getContextualTypeFromParentOrAncestorTypeNode(node, checker) {
129923
+ if (node.flags & (8388608 /* NodeFlags.JSDoc */ & ~262144 /* NodeFlags.JavaScriptFile */))
129924
+ return undefined;
129924
129925
  var contextualType = getContextualTypeFromParent(node, checker);
129925
129926
  if (contextualType)
129926
129927
  return contextualType;
@@ -142835,13 +142836,16 @@ var ts;
142835
142836
  if (!baseDeclaration)
142836
142837
  return;
142837
142838
  var baseTypeNode = ts.getEffectiveBaseTypeNode(baseDeclaration);
142838
- var baseType = baseTypeNode ? typeChecker.getTypeAtLocation(baseTypeNode) : undefined;
142839
- if (!baseType)
142839
+ if (!baseTypeNode)
142840
+ return;
142841
+ var expression = ts.skipParentheses(baseTypeNode.expression);
142842
+ var base = ts.isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression);
142843
+ if (!base)
142840
142844
  return;
142841
142845
  var name = ts.unescapeLeadingUnderscores(ts.getTextOfPropertyName(classElement.name));
142842
142846
  var symbol = ts.hasStaticModifier(classElement)
142843
- ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbolAtLocation(baseType.symbol, baseDeclaration), name)
142844
- : typeChecker.getPropertyOfType(baseType, name);
142847
+ ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name)
142848
+ : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name);
142845
142849
  if (!symbol)
142846
142850
  return;
142847
142851
  return getDefinitionFromSymbol(typeChecker, symbol, node);
@@ -174242,6 +174246,8 @@ var ts;
174242
174246
  return !!this.program && this.program.isSourceOfProjectReferenceRedirect(fileName);
174243
174247
  };
174244
174248
  Project.prototype.enableGlobalPlugins = function (options, pluginConfigOverrides) {
174249
+ if (!this.projectService.globalPlugins.length)
174250
+ return;
174245
174251
  var host = this.projectService.host;
174246
174252
  if (!host.require && !host.importPlugin) {
174247
174253
  this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");
@@ -174252,24 +174258,22 @@ var ts;
174252
174258
  // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/
174253
174259
  ts.combinePaths(this.projectService.getExecutingFilePath(), "../../.."),
174254
174260
  ], false);
174255
- if (this.projectService.globalPlugins) {
174256
- var _loop_1 = function (globalPluginName) {
174257
- // Skip empty names from odd commandline parses
174258
- if (!globalPluginName)
174259
- return "continue";
174260
- // Skip already-locally-loaded plugins
174261
- if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
174262
- return "continue";
174263
- // Provide global: true so plugins can detect why they can't find their config
174264
- this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
174265
- this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
174266
- };
174267
- var this_1 = this;
174268
- // Enable global plugins with synthetic configuration entries
174269
- for (var _i = 0, _a = this.projectService.globalPlugins; _i < _a.length; _i++) {
174270
- var globalPluginName = _a[_i];
174271
- _loop_1(globalPluginName);
174272
- }
174261
+ var _loop_1 = function (globalPluginName) {
174262
+ // Skip empty names from odd commandline parses
174263
+ if (!globalPluginName)
174264
+ return "continue";
174265
+ // Skip already-locally-loaded plugins
174266
+ if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
174267
+ return "continue";
174268
+ // Provide global: true so plugins can detect why they can't find their config
174269
+ this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
174270
+ this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
174271
+ };
174272
+ var this_1 = this;
174273
+ // Enable global plugins with synthetic configuration entries
174274
+ for (var _i = 0, _a = this.projectService.globalPlugins; _i < _a.length; _i++) {
174275
+ var globalPluginName = _a[_i];
174276
+ _loop_1(globalPluginName);
174273
174277
  }
174274
174278
  };
174275
174279
  /**
@@ -175000,6 +175004,9 @@ var ts;
175000
175004
  };
175001
175005
  /*@internal*/
175002
175006
  ConfiguredProject.prototype.enablePluginsWithOptions = function (options, pluginConfigOverrides) {
175007
+ var _a;
175008
+ if (!((_a = options.plugins) === null || _a === void 0 ? void 0 : _a.length) && !this.projectService.globalPlugins.length)
175009
+ return;
175003
175010
  var host = this.projectService.host;
175004
175011
  if (!host.require && !host.importPlugin) {
175005
175012
  this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");
@@ -175015,8 +175022,8 @@ var ts;
175015
175022
  }
175016
175023
  // Enable tsconfig-specified plugins
175017
175024
  if (options.plugins) {
175018
- for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
175019
- var pluginConfigEntry = _a[_i];
175025
+ for (var _i = 0, _b = options.plugins; _i < _b.length; _i++) {
175026
+ var pluginConfigEntry = _b[_i];
175020
175027
  this.enablePlugin(pluginConfigEntry, searchPaths, pluginConfigOverrides);
175021
175028
  }
175022
175029
  }
@@ -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.20221003");
111
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221005");
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -6754,7 +6754,7 @@ var ts;
6754
6754
  }
6755
6755
  /*@internal*/
6756
6756
  function createSystemWatchFunctions(_a) {
6757
- var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6757
+ var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6758
6758
  var pollingWatches = new ts.Map();
6759
6759
  var fsWatches = new ts.Map();
6760
6760
  var fsWatchesRecursive = new ts.Map();
@@ -6820,8 +6820,8 @@ var ts;
6820
6820
  return useNonPollingWatchers ?
6821
6821
  // Use notifications from FS to watch with falling back to fs.watchFile
6822
6822
  generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
6823
- // Default to do not use fixed polling interval
6824
- { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
6823
+ // Default to using fs events
6824
+ { watchFile: ts.WatchFileKind.UseFsEvents };
6825
6825
  }
6826
6826
  }
6827
6827
  function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -7093,7 +7093,6 @@ var ts;
7093
7093
  tscWatchFile: process.env.TSC_WATCHFILE,
7094
7094
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
7095
7095
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
7096
- defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
7097
7096
  inodeWatching: isLinuxOrMacOs,
7098
7097
  sysLog: sysLog,
7099
7098
  }), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
@@ -130339,6 +130338,8 @@ var ts;
130339
130338
  return lastTypeNode;
130340
130339
  }
130341
130340
  function getContextualTypeFromParentOrAncestorTypeNode(node, checker) {
130341
+ if (node.flags & (8388608 /* NodeFlags.JSDoc */ & ~262144 /* NodeFlags.JavaScriptFile */))
130342
+ return undefined;
130342
130343
  var contextualType = getContextualTypeFromParent(node, checker);
130343
130344
  if (contextualType)
130344
130345
  return contextualType;
@@ -143253,13 +143254,16 @@ var ts;
143253
143254
  if (!baseDeclaration)
143254
143255
  return;
143255
143256
  var baseTypeNode = ts.getEffectiveBaseTypeNode(baseDeclaration);
143256
- var baseType = baseTypeNode ? typeChecker.getTypeAtLocation(baseTypeNode) : undefined;
143257
- if (!baseType)
143257
+ if (!baseTypeNode)
143258
+ return;
143259
+ var expression = ts.skipParentheses(baseTypeNode.expression);
143260
+ var base = ts.isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression);
143261
+ if (!base)
143258
143262
  return;
143259
143263
  var name = ts.unescapeLeadingUnderscores(ts.getTextOfPropertyName(classElement.name));
143260
143264
  var symbol = ts.hasStaticModifier(classElement)
143261
- ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbolAtLocation(baseType.symbol, baseDeclaration), name)
143262
- : typeChecker.getPropertyOfType(baseType, name);
143265
+ ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name)
143266
+ : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name);
143263
143267
  if (!symbol)
143264
143268
  return;
143265
143269
  return getDefinitionFromSymbol(typeChecker, symbol, node);
@@ -174241,6 +174245,8 @@ var ts;
174241
174245
  return !!this.program && this.program.isSourceOfProjectReferenceRedirect(fileName);
174242
174246
  };
174243
174247
  Project.prototype.enableGlobalPlugins = function (options, pluginConfigOverrides) {
174248
+ if (!this.projectService.globalPlugins.length)
174249
+ return;
174244
174250
  var host = this.projectService.host;
174245
174251
  if (!host.require && !host.importPlugin) {
174246
174252
  this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");
@@ -174251,24 +174257,22 @@ var ts;
174251
174257
  // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/
174252
174258
  ts.combinePaths(this.projectService.getExecutingFilePath(), "../../.."),
174253
174259
  ], false);
174254
- if (this.projectService.globalPlugins) {
174255
- var _loop_1 = function (globalPluginName) {
174256
- // Skip empty names from odd commandline parses
174257
- if (!globalPluginName)
174258
- return "continue";
174259
- // Skip already-locally-loaded plugins
174260
- if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
174261
- return "continue";
174262
- // Provide global: true so plugins can detect why they can't find their config
174263
- this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
174264
- this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
174265
- };
174266
- var this_1 = this;
174267
- // Enable global plugins with synthetic configuration entries
174268
- for (var _i = 0, _a = this.projectService.globalPlugins; _i < _a.length; _i++) {
174269
- var globalPluginName = _a[_i];
174270
- _loop_1(globalPluginName);
174271
- }
174260
+ var _loop_1 = function (globalPluginName) {
174261
+ // Skip empty names from odd commandline parses
174262
+ if (!globalPluginName)
174263
+ return "continue";
174264
+ // Skip already-locally-loaded plugins
174265
+ if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
174266
+ return "continue";
174267
+ // Provide global: true so plugins can detect why they can't find their config
174268
+ this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
174269
+ this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
174270
+ };
174271
+ var this_1 = this;
174272
+ // Enable global plugins with synthetic configuration entries
174273
+ for (var _i = 0, _a = this.projectService.globalPlugins; _i < _a.length; _i++) {
174274
+ var globalPluginName = _a[_i];
174275
+ _loop_1(globalPluginName);
174272
174276
  }
174273
174277
  };
174274
174278
  /**
@@ -174999,6 +175003,9 @@ var ts;
174999
175003
  };
175000
175004
  /*@internal*/
175001
175005
  ConfiguredProject.prototype.enablePluginsWithOptions = function (options, pluginConfigOverrides) {
175006
+ var _a;
175007
+ if (!((_a = options.plugins) === null || _a === void 0 ? void 0 : _a.length) && !this.projectService.globalPlugins.length)
175008
+ return;
175002
175009
  var host = this.projectService.host;
175003
175010
  if (!host.require && !host.importPlugin) {
175004
175011
  this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");
@@ -175014,8 +175021,8 @@ var ts;
175014
175021
  }
175015
175022
  // Enable tsconfig-specified plugins
175016
175023
  if (options.plugins) {
175017
- for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
175018
- var pluginConfigEntry = _a[_i];
175024
+ for (var _i = 0, _b = options.plugins; _i < _b.length; _i++) {
175025
+ var pluginConfigEntry = _b[_i];
175019
175026
  this.enablePlugin(pluginConfigEntry, searchPaths, pluginConfigOverrides);
175020
175027
  }
175021
175028
  }
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.20221003");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221005");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -6745,7 +6745,7 @@ var ts;
6745
6745
  }
6746
6746
  /*@internal*/
6747
6747
  function createSystemWatchFunctions(_a) {
6748
- var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6748
+ var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6749
6749
  var pollingWatches = new ts.Map();
6750
6750
  var fsWatches = new ts.Map();
6751
6751
  var fsWatchesRecursive = new ts.Map();
@@ -6811,8 +6811,8 @@ var ts;
6811
6811
  return useNonPollingWatchers ?
6812
6812
  // Use notifications from FS to watch with falling back to fs.watchFile
6813
6813
  generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
6814
- // Default to do not use fixed polling interval
6815
- { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
6814
+ // Default to using fs events
6815
+ { watchFile: ts.WatchFileKind.UseFsEvents };
6816
6816
  }
6817
6817
  }
6818
6818
  function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -7084,7 +7084,6 @@ var ts;
7084
7084
  tscWatchFile: process.env.TSC_WATCHFILE,
7085
7085
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
7086
7086
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
7087
- defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
7088
7087
  inodeWatching: isLinuxOrMacOs,
7089
7088
  sysLog: sysLog,
7090
7089
  }), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
@@ -130330,6 +130329,8 @@ var ts;
130330
130329
  return lastTypeNode;
130331
130330
  }
130332
130331
  function getContextualTypeFromParentOrAncestorTypeNode(node, checker) {
130332
+ if (node.flags & (8388608 /* NodeFlags.JSDoc */ & ~262144 /* NodeFlags.JavaScriptFile */))
130333
+ return undefined;
130333
130334
  var contextualType = getContextualTypeFromParent(node, checker);
130334
130335
  if (contextualType)
130335
130336
  return contextualType;
@@ -143244,13 +143245,16 @@ var ts;
143244
143245
  if (!baseDeclaration)
143245
143246
  return;
143246
143247
  var baseTypeNode = ts.getEffectiveBaseTypeNode(baseDeclaration);
143247
- var baseType = baseTypeNode ? typeChecker.getTypeAtLocation(baseTypeNode) : undefined;
143248
- if (!baseType)
143248
+ if (!baseTypeNode)
143249
+ return;
143250
+ var expression = ts.skipParentheses(baseTypeNode.expression);
143251
+ var base = ts.isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression);
143252
+ if (!base)
143249
143253
  return;
143250
143254
  var name = ts.unescapeLeadingUnderscores(ts.getTextOfPropertyName(classElement.name));
143251
143255
  var symbol = ts.hasStaticModifier(classElement)
143252
- ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbolAtLocation(baseType.symbol, baseDeclaration), name)
143253
- : typeChecker.getPropertyOfType(baseType, name);
143256
+ ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name)
143257
+ : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name);
143254
143258
  if (!symbol)
143255
143259
  return;
143256
143260
  return getDefinitionFromSymbol(typeChecker, symbol, node);
@@ -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.20221003");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221005");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -6745,7 +6745,7 @@ var ts;
6745
6745
  }
6746
6746
  /*@internal*/
6747
6747
  function createSystemWatchFunctions(_a) {
6748
- var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6748
+ var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6749
6749
  var pollingWatches = new ts.Map();
6750
6750
  var fsWatches = new ts.Map();
6751
6751
  var fsWatchesRecursive = new ts.Map();
@@ -6811,8 +6811,8 @@ var ts;
6811
6811
  return useNonPollingWatchers ?
6812
6812
  // Use notifications from FS to watch with falling back to fs.watchFile
6813
6813
  generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
6814
- // Default to do not use fixed polling interval
6815
- { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
6814
+ // Default to using fs events
6815
+ { watchFile: ts.WatchFileKind.UseFsEvents };
6816
6816
  }
6817
6817
  }
6818
6818
  function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -7084,7 +7084,6 @@ var ts;
7084
7084
  tscWatchFile: process.env.TSC_WATCHFILE,
7085
7085
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
7086
7086
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
7087
- defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
7088
7087
  inodeWatching: isLinuxOrMacOs,
7089
7088
  sysLog: sysLog,
7090
7089
  }), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
@@ -130330,6 +130329,8 @@ var ts;
130330
130329
  return lastTypeNode;
130331
130330
  }
130332
130331
  function getContextualTypeFromParentOrAncestorTypeNode(node, checker) {
130332
+ if (node.flags & (8388608 /* NodeFlags.JSDoc */ & ~262144 /* NodeFlags.JavaScriptFile */))
130333
+ return undefined;
130333
130334
  var contextualType = getContextualTypeFromParent(node, checker);
130334
130335
  if (contextualType)
130335
130336
  return contextualType;
@@ -143244,13 +143245,16 @@ var ts;
143244
143245
  if (!baseDeclaration)
143245
143246
  return;
143246
143247
  var baseTypeNode = ts.getEffectiveBaseTypeNode(baseDeclaration);
143247
- var baseType = baseTypeNode ? typeChecker.getTypeAtLocation(baseTypeNode) : undefined;
143248
- if (!baseType)
143248
+ if (!baseTypeNode)
143249
+ return;
143250
+ var expression = ts.skipParentheses(baseTypeNode.expression);
143251
+ var base = ts.isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression);
143252
+ if (!base)
143249
143253
  return;
143250
143254
  var name = ts.unescapeLeadingUnderscores(ts.getTextOfPropertyName(classElement.name));
143251
143255
  var symbol = ts.hasStaticModifier(classElement)
143252
- ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbolAtLocation(baseType.symbol, baseDeclaration), name)
143253
- : typeChecker.getPropertyOfType(baseType, name);
143256
+ ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name)
143257
+ : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name);
143254
143258
  if (!symbol)
143255
143259
  return;
143256
143260
  return getDefinitionFromSymbol(typeChecker, symbol, node);
@@ -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.20221003");
92
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221005");
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -6735,7 +6735,7 @@ var ts;
6735
6735
  }
6736
6736
  /*@internal*/
6737
6737
  function createSystemWatchFunctions(_a) {
6738
- var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6738
+ var pollingWatchFileWorker = _a.pollingWatchFileWorker, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatchWorker = _a.fsWatchWorker, fileSystemEntryExists = _a.fileSystemEntryExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, inodeWatching = _a.inodeWatching, sysLog = _a.sysLog;
6739
6739
  var pollingWatches = new ts.Map();
6740
6740
  var fsWatches = new ts.Map();
6741
6741
  var fsWatchesRecursive = new ts.Map();
@@ -6801,8 +6801,8 @@ var ts;
6801
6801
  return useNonPollingWatchers ?
6802
6802
  // Use notifications from FS to watch with falling back to fs.watchFile
6803
6803
  generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
6804
- // Default to do not use fixed polling interval
6805
- { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.UseFsEvents };
6804
+ // Default to using fs events
6805
+ { watchFile: ts.WatchFileKind.UseFsEvents };
6806
6806
  }
6807
6807
  }
6808
6808
  function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -7074,7 +7074,6 @@ var ts;
7074
7074
  tscWatchFile: process.env.TSC_WATCHFILE,
7075
7075
  useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
7076
7076
  tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
7077
- defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
7078
7077
  inodeWatching: isLinuxOrMacOs,
7079
7078
  sysLog: sysLog,
7080
7079
  }), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory;
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.20221003",
5
+ "version": "4.9.0-dev.20221005",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [