diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index 59937241850..9b359f8bca7 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -1966,7 +1966,7 @@ interface Int8Array { interface Int8ArrayConstructor { readonly prototype: Int8Array; new(length: number): Int8Array; - new(array: ArrayLike): Int8Array; + new(array: ArrayLike | ArrayBufferLike): Int8Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; /** @@ -2249,7 +2249,7 @@ interface Uint8Array { interface Uint8ArrayConstructor { readonly prototype: Uint8Array; new(length: number): Uint8Array; - new(array: ArrayLike): Uint8Array; + new(array: ArrayLike | ArrayBufferLike): Uint8Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; /** @@ -2531,7 +2531,7 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { readonly prototype: Uint8ClampedArray; new(length: number): Uint8ClampedArray; - new(array: ArrayLike): Uint8ClampedArray; + new(array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; /** @@ -2811,7 +2811,7 @@ interface Int16Array { interface Int16ArrayConstructor { readonly prototype: Int16Array; new(length: number): Int16Array; - new(array: ArrayLike): Int16Array; + new(array: ArrayLike | ArrayBufferLike): Int16Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; /** @@ -3094,7 +3094,7 @@ interface Uint16Array { interface Uint16ArrayConstructor { readonly prototype: Uint16Array; new(length: number): Uint16Array; - new(array: ArrayLike): Uint16Array; + new(array: ArrayLike | ArrayBufferLike): Uint16Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; /** @@ -3376,7 +3376,7 @@ interface Int32Array { interface Int32ArrayConstructor { readonly prototype: Int32Array; new(length: number): Int32Array; - new(array: ArrayLike): Int32Array; + new(array: ArrayLike | ArrayBufferLike): Int32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; /** @@ -3657,7 +3657,7 @@ interface Uint32Array { interface Uint32ArrayConstructor { readonly prototype: Uint32Array; new(length: number): Uint32Array; - new(array: ArrayLike): Uint32Array; + new(array: ArrayLike | ArrayBufferLike): Uint32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; /** @@ -3939,7 +3939,7 @@ interface Float32Array { interface Float32ArrayConstructor { readonly prototype: Float32Array; new(length: number): Float32Array; - new(array: ArrayLike): Float32Array; + new(array: ArrayLike | ArrayBufferLike): Float32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; /** @@ -4213,7 +4213,7 @@ interface Float64Array { interface Float64ArrayConstructor { readonly prototype: Float64Array; new(length: number): Float64Array; - new(array: ArrayLike): Float64Array; + new(array: ArrayLike | ArrayBufferLike): Float64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; /** diff --git a/lib/tsc.js b/lib/tsc.js index ea0b564b799..ed478d835c9 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -38474,7 +38474,6 @@ var ts; } function getSpecifierForModuleSymbol(symbol, context) { var _a; - var _b; var file = ts.getDeclarationOfKind(symbol, 294); if (!file) { var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); }); @@ -38513,7 +38512,7 @@ var ts; var moduleResolverHost = context.tracker.moduleResolverHost; var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" })); - (_a = (_b = links).specifierCache) !== null && _a !== void 0 ? _a : (_b.specifierCache = new ts.Map()); + (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map()); links.specifierCache.set(contextFile.path, specifier); } return specifier; @@ -87713,7 +87712,7 @@ var ts; perDirectoryResolution.set(name, resolution); } resolutionsInFile.set(name, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName); + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); } @@ -87836,14 +87835,14 @@ var ts; function isPathWithDefaultFailedLookupExtension(path) { return ts.fileExtensionIsOneOf(path, failedLookupDefaultExtensions); } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) { + function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, noResolveResolution) { if (resolution.refCount) { resolution.refCount++; ts.Debug.assertDefined(resolution.files); } else { resolution.refCount = 1; - ts.Debug.assert(resolution.files === undefined); + ts.Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && ts.length(noResolveResolution.files) === 0)); if (ts.isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } diff --git a/lib/tsserver.js b/lib/tsserver.js index a72724045af..0df27d7480d 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -79,7 +79,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -46896,7 +46896,6 @@ var ts; } function getSpecifierForModuleSymbol(symbol, context) { var _a; - var _b; var file = ts.getDeclarationOfKind(symbol, 294 /* SourceFile */); if (!file) { var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); }); @@ -46941,7 +46940,7 @@ var ts; var moduleResolverHost = context.tracker.moduleResolverHost; var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" })); - (_a = (_b = links).specifierCache) !== null && _a !== void 0 ? _a : (_b.specifierCache = new ts.Map()); + (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map()); links.specifierCache.set(contextFile.path, specifier); } return specifier; @@ -106973,7 +106972,7 @@ var ts; perDirectoryResolution.set(name, resolution); } resolutionsInFile.set(name, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName); + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); } @@ -107104,14 +107103,14 @@ var ts; function isPathWithDefaultFailedLookupExtension(path) { return ts.fileExtensionIsOneOf(path, failedLookupDefaultExtensions); } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) { + function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, noResolveResolution) { if (resolution.refCount) { resolution.refCount++; ts.Debug.assertDefined(resolution.files); } else { resolution.refCount = 1; - ts.Debug.assert(resolution.files === undefined); + ts.Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && ts.length(noResolveResolution.files) === 0)); if (ts.isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 9ac64998266..22aafc034a6 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -78,7 +78,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -47090,7 +47090,6 @@ var ts; } function getSpecifierForModuleSymbol(symbol, context) { var _a; - var _b; var file = ts.getDeclarationOfKind(symbol, 294 /* SourceFile */); if (!file) { var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); }); @@ -47135,7 +47134,7 @@ var ts; var moduleResolverHost = context.tracker.moduleResolverHost; var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" })); - (_a = (_b = links).specifierCache) !== null && _a !== void 0 ? _a : (_b.specifierCache = new ts.Map()); + (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map()); links.specifierCache.set(contextFile.path, specifier); } return specifier; @@ -107167,7 +107166,7 @@ var ts; perDirectoryResolution.set(name, resolution); } resolutionsInFile.set(name, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName); + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); } @@ -107298,14 +107297,14 @@ var ts; function isPathWithDefaultFailedLookupExtension(path) { return ts.fileExtensionIsOneOf(path, failedLookupDefaultExtensions); } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) { + function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, noResolveResolution) { if (resolution.refCount) { resolution.refCount++; ts.Debug.assertDefined(resolution.files); } else { resolution.refCount = 1; - ts.Debug.assert(resolution.files === undefined); + ts.Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && ts.length(noResolveResolution.files) === 0)); if (ts.isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } diff --git a/lib/typescript.js b/lib/typescript.js index ebbbc6fc146..17d0cccb744 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -78,7 +78,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -47090,7 +47090,6 @@ var ts; } function getSpecifierForModuleSymbol(symbol, context) { var _a; - var _b; var file = ts.getDeclarationOfKind(symbol, 294 /* SourceFile */); if (!file) { var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); }); @@ -47135,7 +47134,7 @@ var ts; var moduleResolverHost = context.tracker.moduleResolverHost; var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" })); - (_a = (_b = links).specifierCache) !== null && _a !== void 0 ? _a : (_b.specifierCache = new ts.Map()); + (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map()); links.specifierCache.set(contextFile.path, specifier); } return specifier; @@ -107167,7 +107166,7 @@ var ts; perDirectoryResolution.set(name, resolution); } resolutionsInFile.set(name, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName); + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); } @@ -107298,14 +107297,14 @@ var ts; function isPathWithDefaultFailedLookupExtension(path) { return ts.fileExtensionIsOneOf(path, failedLookupDefaultExtensions); } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) { + function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, noResolveResolution) { if (resolution.refCount) { resolution.refCount++; ts.Debug.assertDefined(resolution.files); } else { resolution.refCount = 1; - ts.Debug.assert(resolution.files === undefined); + ts.Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && ts.length(noResolveResolution.files) === 0)); if (ts.isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 11a50515b34..c47133f64d4 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -78,7 +78,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -47090,7 +47090,6 @@ var ts; } function getSpecifierForModuleSymbol(symbol, context) { var _a; - var _b; var file = ts.getDeclarationOfKind(symbol, 294 /* SourceFile */); if (!file) { var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); }); @@ -47135,7 +47134,7 @@ var ts; var moduleResolverHost = context.tracker.moduleResolverHost; var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" })); - (_a = (_b = links).specifierCache) !== null && _a !== void 0 ? _a : (_b.specifierCache = new ts.Map()); + (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map()); links.specifierCache.set(contextFile.path, specifier); } return specifier; @@ -107167,7 +107166,7 @@ var ts; perDirectoryResolution.set(name, resolution); } resolutionsInFile.set(name, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName); + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); } @@ -107298,14 +107297,14 @@ var ts; function isPathWithDefaultFailedLookupExtension(path) { return ts.fileExtensionIsOneOf(path, failedLookupDefaultExtensions); } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) { + function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, noResolveResolution) { if (resolution.refCount) { resolution.refCount++; ts.Debug.assertDefined(resolution.files); } else { resolution.refCount = 1; - ts.Debug.assert(resolution.files === undefined); + ts.Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && ts.length(noResolveResolution.files) === 0)); if (ts.isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index 4afd311aa57..7b09eb89478 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -68,7 +68,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -46885,7 +46885,6 @@ var ts; } function getSpecifierForModuleSymbol(symbol, context) { var _a; - var _b; var file = ts.getDeclarationOfKind(symbol, 294 /* SourceFile */); if (!file) { var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); }); @@ -46930,7 +46929,7 @@ var ts; var moduleResolverHost = context.tracker.moduleResolverHost; var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" })); - (_a = (_b = links).specifierCache) !== null && _a !== void 0 ? _a : (_b.specifierCache = new ts.Map()); + (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map()); links.specifierCache.set(contextFile.path, specifier); } return specifier; @@ -106962,7 +106961,7 @@ var ts; perDirectoryResolution.set(name, resolution); } resolutionsInFile.set(name, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName); + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution); if (existingResolution) { stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); } @@ -107093,14 +107092,14 @@ var ts; function isPathWithDefaultFailedLookupExtension(path) { return ts.fileExtensionIsOneOf(path, failedLookupDefaultExtensions); } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) { + function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, noResolveResolution) { if (resolution.refCount) { resolution.refCount++; ts.Debug.assertDefined(resolution.files); } else { resolution.refCount = 1; - ts.Debug.assert(resolution.files === undefined); + ts.Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && ts.length(noResolveResolution.files) === 0)); if (ts.isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); }