typescript 6.0.0-dev.20250924 → 6.0.0-dev.20250925
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 +33 -68
- package/lib/lib.d.ts +0 -2
- package/lib/lib.decorators.d.ts +0 -2
- package/lib/lib.decorators.legacy.d.ts +0 -2
- package/lib/lib.dom.asynciterable.d.ts +0 -2
- package/lib/lib.dom.d.ts +0 -2
- package/lib/lib.dom.iterable.d.ts +0 -2
- package/lib/lib.es2015.collection.d.ts +0 -2
- package/lib/lib.es2015.core.d.ts +0 -2
- package/lib/lib.es2015.d.ts +0 -2
- package/lib/lib.es2015.generator.d.ts +0 -2
- package/lib/lib.es2015.iterable.d.ts +0 -2
- package/lib/lib.es2015.promise.d.ts +0 -2
- package/lib/lib.es2015.proxy.d.ts +0 -2
- package/lib/lib.es2015.reflect.d.ts +0 -2
- package/lib/lib.es2015.symbol.d.ts +0 -2
- package/lib/lib.es2015.symbol.wellknown.d.ts +0 -2
- package/lib/lib.es2016.array.include.d.ts +0 -2
- package/lib/lib.es2016.d.ts +0 -2
- package/lib/lib.es2016.full.d.ts +0 -2
- package/lib/lib.es2016.intl.d.ts +0 -2
- package/lib/lib.es2017.arraybuffer.d.ts +0 -2
- package/lib/lib.es2017.d.ts +0 -2
- package/lib/lib.es2017.date.d.ts +0 -2
- package/lib/lib.es2017.full.d.ts +0 -2
- package/lib/lib.es2017.intl.d.ts +0 -2
- package/lib/lib.es2017.object.d.ts +0 -2
- package/lib/lib.es2017.sharedmemory.d.ts +0 -2
- package/lib/lib.es2017.string.d.ts +0 -2
- package/lib/lib.es2017.typedarrays.d.ts +0 -2
- package/lib/lib.es2018.asyncgenerator.d.ts +0 -2
- package/lib/lib.es2018.asynciterable.d.ts +0 -2
- package/lib/lib.es2018.d.ts +0 -2
- package/lib/lib.es2018.full.d.ts +0 -2
- package/lib/lib.es2018.intl.d.ts +0 -2
- package/lib/lib.es2018.promise.d.ts +0 -2
- package/lib/lib.es2018.regexp.d.ts +0 -2
- package/lib/lib.es2019.array.d.ts +0 -2
- package/lib/lib.es2019.d.ts +0 -2
- package/lib/lib.es2019.full.d.ts +0 -2
- package/lib/lib.es2019.intl.d.ts +0 -2
- package/lib/lib.es2019.object.d.ts +0 -2
- package/lib/lib.es2019.string.d.ts +0 -2
- package/lib/lib.es2019.symbol.d.ts +0 -2
- package/lib/lib.es2020.bigint.d.ts +0 -2
- package/lib/lib.es2020.d.ts +0 -2
- package/lib/lib.es2020.date.d.ts +0 -2
- package/lib/lib.es2020.full.d.ts +0 -2
- package/lib/lib.es2020.intl.d.ts +0 -2
- package/lib/lib.es2020.number.d.ts +0 -2
- package/lib/lib.es2020.promise.d.ts +0 -2
- package/lib/lib.es2020.sharedmemory.d.ts +0 -2
- package/lib/lib.es2020.string.d.ts +0 -2
- package/lib/lib.es2020.symbol.wellknown.d.ts +0 -2
- package/lib/lib.es2021.d.ts +0 -2
- package/lib/lib.es2021.full.d.ts +0 -2
- package/lib/lib.es2021.intl.d.ts +0 -2
- package/lib/lib.es2021.promise.d.ts +0 -2
- package/lib/lib.es2021.string.d.ts +0 -2
- package/lib/lib.es2021.weakref.d.ts +0 -2
- package/lib/lib.es2022.array.d.ts +0 -2
- package/lib/lib.es2022.d.ts +0 -2
- package/lib/lib.es2022.error.d.ts +0 -2
- package/lib/lib.es2022.full.d.ts +0 -2
- package/lib/lib.es2022.intl.d.ts +0 -2
- package/lib/lib.es2022.object.d.ts +0 -2
- package/lib/lib.es2022.regexp.d.ts +0 -2
- package/lib/lib.es2022.string.d.ts +0 -2
- package/lib/lib.es2023.array.d.ts +0 -2
- package/lib/lib.es2023.collection.d.ts +0 -2
- package/lib/lib.es2023.d.ts +0 -2
- package/lib/lib.es2023.full.d.ts +0 -2
- package/lib/lib.es2023.intl.d.ts +0 -2
- package/lib/lib.es2024.arraybuffer.d.ts +0 -2
- package/lib/lib.es2024.collection.d.ts +0 -2
- package/lib/lib.es2024.d.ts +0 -2
- package/lib/lib.es2024.full.d.ts +0 -2
- package/lib/lib.es2024.object.d.ts +0 -2
- package/lib/lib.es2024.promise.d.ts +0 -2
- package/lib/lib.es2024.regexp.d.ts +0 -2
- package/lib/lib.es2024.sharedmemory.d.ts +0 -2
- package/lib/lib.es2024.string.d.ts +0 -2
- package/lib/lib.es5.d.ts +0 -2
- package/lib/lib.es6.d.ts +0 -2
- package/lib/lib.esnext.array.d.ts +0 -2
- package/lib/lib.esnext.collection.d.ts +0 -2
- package/lib/lib.esnext.d.ts +0 -2
- package/lib/lib.esnext.decorators.d.ts +0 -2
- package/lib/lib.esnext.disposable.d.ts +0 -2
- package/lib/lib.esnext.error.d.ts +0 -2
- package/lib/lib.esnext.float16.d.ts +0 -2
- package/lib/lib.esnext.full.d.ts +0 -2
- package/lib/lib.esnext.intl.d.ts +0 -2
- package/lib/lib.esnext.iterator.d.ts +0 -2
- package/lib/lib.esnext.promise.d.ts +0 -2
- package/lib/lib.esnext.sharedmemory.d.ts +0 -2
- package/lib/lib.scripthost.d.ts +0 -2
- package/lib/lib.webworker.asynciterable.d.ts +0 -2
- package/lib/lib.webworker.d.ts +0 -2
- package/lib/lib.webworker.importscripts.d.ts +0 -2
- package/lib/lib.webworker.iterable.d.ts +0 -2
- package/lib/typescript.d.ts +2 -8
- package/lib/typescript.js +48 -85
- package/package.json +2 -2
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
/// <reference lib="es2015.iterable" />
|
20
18
|
|
21
19
|
// NOTE: This is specified as what is essentially an unreachable module. All actual global declarations can be found
|
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
interface PromiseConstructor {
|
20
18
|
/**
|
21
19
|
* Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result
|
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
interface Atomics {
|
20
18
|
/**
|
21
19
|
* Performs a finite-time microwait by signaling to the operating system or
|
package/lib/lib.scripthost.d.ts
CHANGED
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
/////////////////////////////
|
20
18
|
/// Windows Script Host APIS
|
21
19
|
/////////////////////////////
|
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
/////////////////////////////
|
20
18
|
/// Worker Async Iterable APIs
|
21
19
|
/////////////////////////////
|
package/lib/lib.webworker.d.ts
CHANGED
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
/////////////////////////////
|
20
18
|
/// WorkerGlobalScope APIs
|
21
19
|
/////////////////////////////
|
@@ -14,8 +14,6 @@ and limitations under the License.
|
|
14
14
|
***************************************************************************** */
|
15
15
|
|
16
16
|
|
17
|
-
/// <reference no-default-lib="true"/>
|
18
|
-
|
19
17
|
/////////////////////////////
|
20
18
|
/// Worker Iterable APIs
|
21
19
|
/////////////////////////////
|
package/lib/typescript.d.ts
CHANGED
@@ -5927,14 +5927,7 @@ declare namespace ts {
|
|
5927
5927
|
libReferenceDirectives: readonly FileReference[];
|
5928
5928
|
languageVariant: LanguageVariant;
|
5929
5929
|
isDeclarationFile: boolean;
|
5930
|
-
/**
|
5931
|
-
* lib.d.ts should have a reference comment like
|
5932
|
-
*
|
5933
|
-
* /// <reference no-default-lib="true"/>
|
5934
|
-
*
|
5935
|
-
* If any other file has this comment, it signals not to include lib.d.ts
|
5936
|
-
* because this containing file is intended to act as a default library.
|
5937
|
-
*/
|
5930
|
+
/** @deprecated Always false. Use a Program to determine if a file is a lib file. */
|
5938
5931
|
hasNoDefaultLib: boolean;
|
5939
5932
|
languageVersion: ScriptTarget;
|
5940
5933
|
/**
|
@@ -10043,6 +10036,7 @@ declare namespace ts {
|
|
10043
10036
|
libReferenceDirectives: FileReference[];
|
10044
10037
|
importedFiles: FileReference[];
|
10045
10038
|
ambientExternalModules?: string[];
|
10039
|
+
/** @deprecated Always false. Use a Program to determine if a file is a lib file. */
|
10046
10040
|
isLibFile: boolean;
|
10047
10041
|
}
|
10048
10042
|
interface HostCancellationToken {
|
package/lib/typescript.js
CHANGED
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2286
2286
|
|
2287
2287
|
// src/compiler/corePublic.ts
|
2288
2288
|
var versionMajorMinor = "6.0";
|
2289
|
-
var version = `${versionMajorMinor}.0-dev.
|
2289
|
+
var version = `${versionMajorMinor}.0-dev.20250925`;
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -22833,7 +22833,7 @@ function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) {
|
|
22833
22833
|
);
|
22834
22834
|
}
|
22835
22835
|
function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) {
|
22836
|
-
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile
|
22836
|
+
return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && host.isSourceFileDefaultLibrary(sourceFile) || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options);
|
22837
22837
|
}
|
22838
22838
|
function canIncludeBindAndCheckDiagnostics(sourceFile, options) {
|
22839
22839
|
if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
|
@@ -28365,8 +28365,17 @@ function createNodeFactory(flags, baseFactory2) {
|
|
28365
28365
|
node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken);
|
28366
28366
|
return node;
|
28367
28367
|
}
|
28368
|
-
function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives,
|
28369
|
-
return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.
|
28368
|
+
function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, _hasNoDefaultLib = false, libReferenceDirectives = node.libReferenceDirectives) {
|
28369
|
+
return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(
|
28370
|
+
node,
|
28371
|
+
statements,
|
28372
|
+
isDeclarationFile,
|
28373
|
+
referencedFiles,
|
28374
|
+
typeReferenceDirectives,
|
28375
|
+
/*hasNoDefaultLib*/
|
28376
|
+
false,
|
28377
|
+
libReferenceDirectives
|
28378
|
+
), node) : node;
|
28370
28379
|
}
|
28371
28380
|
function createBundle(sourceFiles) {
|
28372
28381
|
const node = createBaseNode(309 /* Bundle */);
|
@@ -28374,7 +28383,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
28374
28383
|
node.syntheticFileReferences = void 0;
|
28375
28384
|
node.syntheticTypeReferences = void 0;
|
28376
28385
|
node.syntheticLibReferences = void 0;
|
28377
|
-
node.hasNoDefaultLib = void 0;
|
28378
28386
|
return node;
|
28379
28387
|
}
|
28380
28388
|
function updateBundle(node, sourceFiles) {
|
@@ -40430,7 +40438,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
|
|
40430
40438
|
context.typeReferenceDirectives = [];
|
40431
40439
|
context.libReferenceDirectives = [];
|
40432
40440
|
context.amdDependencies = [];
|
40433
|
-
context.hasNoDefaultLib = false;
|
40434
40441
|
context.pragmas.forEach((entryOrList, key) => {
|
40435
40442
|
switch (key) {
|
40436
40443
|
case "reference": {
|
@@ -40441,7 +40448,6 @@ function processPragmasIntoFields(context, reportDiagnostic) {
|
|
40441
40448
|
const { types, lib, path, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
|
40442
40449
|
const preserve = _preserve === "true" ? true : void 0;
|
40443
40450
|
if (arg.arguments["no-default-lib"] === "true") {
|
40444
|
-
context.hasNoDefaultLib = true;
|
40445
40451
|
} else if (types) {
|
40446
40452
|
const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic);
|
40447
40453
|
typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
|
@@ -68689,14 +68695,14 @@ function createTypeChecker(host) {
|
|
68689
68695
|
let issuedElaboration = false;
|
68690
68696
|
if (!targetProp) {
|
68691
68697
|
const indexInfo = getApplicableIndexInfo(target, nameType);
|
68692
|
-
if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration)
|
68698
|
+
if (indexInfo && indexInfo.declaration && !host.isSourceFileDefaultLibrary(getSourceFileOfNode(indexInfo.declaration))) {
|
68693
68699
|
issuedElaboration = true;
|
68694
68700
|
addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature));
|
68695
68701
|
}
|
68696
68702
|
}
|
68697
68703
|
if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) {
|
68698
68704
|
const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0];
|
68699
|
-
if (!getSourceFileOfNode(targetNode)
|
68705
|
+
if (!host.isSourceFileDefaultLibrary(getSourceFileOfNode(targetNode))) {
|
68700
68706
|
addRelatedInfo(
|
68701
68707
|
reportedDiag,
|
68702
68708
|
createDiagnosticForNode(
|
@@ -118702,11 +118708,9 @@ function transformDeclarations(context) {
|
|
118702
118708
|
rawReferencedFiles = [];
|
118703
118709
|
rawTypeReferenceDirectives = [];
|
118704
118710
|
rawLibReferenceDirectives = [];
|
118705
|
-
let hasNoDefaultLib = false;
|
118706
118711
|
const bundle = factory2.createBundle(
|
118707
118712
|
map(node.sourceFiles, (sourceFile) => {
|
118708
118713
|
if (sourceFile.isDeclarationFile) return void 0;
|
118709
|
-
hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
|
118710
118714
|
currentSourceFile = sourceFile;
|
118711
118715
|
enclosingDeclaration = sourceFile;
|
118712
118716
|
lateMarkedStatements = void 0;
|
@@ -118767,7 +118771,6 @@ function transformDeclarations(context) {
|
|
118767
118771
|
bundle.syntheticFileReferences = getReferencedFiles(outputFilePath2);
|
118768
118772
|
bundle.syntheticTypeReferences = getTypeReferences();
|
118769
118773
|
bundle.syntheticLibReferences = getLibReferences();
|
118770
|
-
bundle.hasNoDefaultLib = hasNoDefaultLib;
|
118771
118774
|
return bundle;
|
118772
118775
|
}
|
118773
118776
|
needsDeclare = true;
|
@@ -118808,7 +118811,8 @@ function transformDeclarations(context) {
|
|
118808
118811
|
true,
|
118809
118812
|
getReferencedFiles(outputFilePath),
|
118810
118813
|
getTypeReferences(),
|
118811
|
-
|
118814
|
+
/*hasNoDefaultLib*/
|
118815
|
+
false,
|
118812
118816
|
getLibReferences()
|
118813
118817
|
);
|
118814
118818
|
function collectFileReferences(sourceFile) {
|
@@ -123978,16 +123982,12 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
123978
123982
|
emitSourceFileWorker(node);
|
123979
123983
|
}
|
123980
123984
|
function emitSyntheticTripleSlashReferencesIfNeeded(node) {
|
123981
|
-
emitTripleSlashDirectives(
|
123985
|
+
emitTripleSlashDirectives(node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []);
|
123982
123986
|
}
|
123983
123987
|
function emitTripleSlashDirectivesIfNeeded(node) {
|
123984
|
-
if (node.isDeclarationFile) emitTripleSlashDirectives(node.
|
123988
|
+
if (node.isDeclarationFile) emitTripleSlashDirectives(node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives);
|
123985
123989
|
}
|
123986
|
-
function emitTripleSlashDirectives(
|
123987
|
-
if (hasNoDefaultLib) {
|
123988
|
-
writeComment(`/// <reference no-default-lib="true"/>`);
|
123989
|
-
writeLine();
|
123990
|
-
}
|
123990
|
+
function emitTripleSlashDirectives(files, types, libs2) {
|
123991
123991
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
123992
123992
|
writeComment(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
|
123993
123993
|
writeLine();
|
@@ -126980,7 +126980,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
126980
126980
|
mark("beforeProgram");
|
126981
126981
|
const host = createProgramOptionsHost || createCompilerHost(options);
|
126982
126982
|
const configParsingHost = parseConfigHostFromCompilerHostLike(host);
|
126983
|
-
let skipDefaultLib = options.noLib;
|
126984
126983
|
const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
|
126985
126984
|
const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
|
126986
126985
|
let skipVerifyCompilerOptions = false;
|
@@ -127068,6 +127067,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
127068
127067
|
let redirectTargetsMap = createMultiMap();
|
127069
127068
|
let usesUriStyleNodeCoreModules;
|
127070
127069
|
const filesByName = /* @__PURE__ */ new Map();
|
127070
|
+
const libFiles = /* @__PURE__ */ new Set();
|
127071
127071
|
let missingFileNames = /* @__PURE__ */ new Map();
|
127072
127072
|
const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0;
|
127073
127073
|
let resolvedProjectReferences;
|
@@ -127129,8 +127129,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
127129
127129
|
name,
|
127130
127130
|
/*isDefaultLib*/
|
127131
127131
|
false,
|
127132
|
-
/*ignoreNoDefaultLib*/
|
127133
|
-
false,
|
127134
127132
|
{ kind: 0 /* RootFile */, index }
|
127135
127133
|
));
|
127136
127134
|
(_j = tracing) == null ? void 0 : _j.pop();
|
@@ -127162,15 +127160,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
127162
127160
|
}
|
127163
127161
|
(_n = tracing) == null ? void 0 : _n.pop();
|
127164
127162
|
}
|
127165
|
-
if (rootNames.length && !
|
127163
|
+
if (rootNames.length && !options.noLib) {
|
127166
127164
|
const defaultLibraryFileName = getDefaultLibraryFileName();
|
127167
127165
|
if (!options.lib && defaultLibraryFileName) {
|
127166
|
+
libFiles.add(toPath3(defaultLibraryFileName));
|
127168
127167
|
processRootFile(
|
127169
127168
|
defaultLibraryFileName,
|
127170
127169
|
/*isDefaultLib*/
|
127171
127170
|
true,
|
127172
|
-
/*ignoreNoDefaultLib*/
|
127173
|
-
false,
|
127174
127171
|
{ kind: 6 /* LibFile */ }
|
127175
127172
|
);
|
127176
127173
|
} else {
|
@@ -127179,8 +127176,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
127179
127176
|
pathForLibFile(libFileName),
|
127180
127177
|
/*isDefaultLib*/
|
127181
127178
|
true,
|
127182
|
-
/*ignoreNoDefaultLib*/
|
127183
|
-
false,
|
127184
127179
|
{ kind: 6 /* LibFile */, index }
|
127185
127180
|
);
|
127186
127181
|
});
|
@@ -127691,8 +127686,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
127691
127686
|
structureIsReused = 1 /* SafeModules */;
|
127692
127687
|
} else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
|
127693
127688
|
structureIsReused = 1 /* SafeModules */;
|
127694
|
-
} else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
|
127695
|
-
structureIsReused = 1 /* SafeModules */;
|
127696
127689
|
} else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
|
127697
127690
|
structureIsReused = 1 /* SafeModules */;
|
127698
127691
|
} else {
|
@@ -127874,24 +127867,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
127874
127867
|
return !!sourceFilesFoundSearchingNodeModules.get(file.path);
|
127875
127868
|
}
|
127876
127869
|
function isSourceFileDefaultLibrary(file) {
|
127877
|
-
|
127878
|
-
return false;
|
127879
|
-
}
|
127880
|
-
if (file.hasNoDefaultLib) {
|
127881
|
-
return true;
|
127882
|
-
}
|
127883
|
-
if (options.noLib) {
|
127884
|
-
return false;
|
127885
|
-
}
|
127886
|
-
const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive;
|
127887
|
-
if (!options.lib) {
|
127888
|
-
return equalityComparer(file.fileName, getDefaultLibraryFileName());
|
127889
|
-
} else {
|
127890
|
-
return some(options.lib, (libFileName) => {
|
127891
|
-
const resolvedLib = resolvedLibReferences.get(libFileName);
|
127892
|
-
return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual);
|
127893
|
-
});
|
127894
|
-
}
|
127870
|
+
return libFiles.has(file.path);
|
127895
127871
|
}
|
127896
127872
|
function getTypeChecker() {
|
127897
127873
|
return typeChecker || (typeChecker = createTypeChecker(program));
|
@@ -128372,11 +128348,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128372
128348
|
function getConfigFileParsingDiagnostics2() {
|
128373
128349
|
return configFileParsingDiagnostics || emptyArray;
|
128374
128350
|
}
|
128375
|
-
function processRootFile(fileName, isDefaultLib,
|
128351
|
+
function processRootFile(fileName, isDefaultLib, reason) {
|
128376
128352
|
processSourceFile(
|
128377
128353
|
normalizePath(fileName),
|
128378
128354
|
isDefaultLib,
|
128379
|
-
ignoreNoDefaultLib,
|
128380
128355
|
/*packageId*/
|
128381
128356
|
void 0,
|
128382
128357
|
reason
|
@@ -128541,10 +128516,10 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128541
128516
|
return sourceFileWithAddedExtension;
|
128542
128517
|
}
|
128543
128518
|
}
|
128544
|
-
function processSourceFile(fileName, isDefaultLib,
|
128519
|
+
function processSourceFile(fileName, isDefaultLib, packageId, reason) {
|
128545
128520
|
getSourceFileFromReferenceWorker(
|
128546
128521
|
fileName,
|
128547
|
-
(fileName2) => findSourceFile(fileName2, isDefaultLib,
|
128522
|
+
(fileName2) => findSourceFile(fileName2, isDefaultLib, reason, packageId),
|
128548
128523
|
// TODO: GH#18217
|
128549
128524
|
(diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic(
|
128550
128525
|
/*file*/
|
@@ -128561,8 +128536,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128561
128536
|
fileName,
|
128562
128537
|
/*isDefaultLib*/
|
128563
128538
|
false,
|
128564
|
-
/*ignoreNoDefaultLib*/
|
128565
|
-
false,
|
128566
128539
|
/*packageId*/
|
128567
128540
|
void 0,
|
128568
128541
|
reason
|
@@ -128588,14 +128561,14 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128588
128561
|
sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0);
|
128589
128562
|
return redirect;
|
128590
128563
|
}
|
128591
|
-
function findSourceFile(fileName, isDefaultLib,
|
128564
|
+
function findSourceFile(fileName, isDefaultLib, reason, packageId) {
|
128592
128565
|
var _a2, _b2;
|
128593
128566
|
(_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", {
|
128594
128567
|
fileName,
|
128595
128568
|
isDefaultLib: isDefaultLib || void 0,
|
128596
128569
|
fileIncludeKind: FileIncludeKind[reason.kind]
|
128597
128570
|
});
|
128598
|
-
const result = findSourceFileWorker(fileName, isDefaultLib,
|
128571
|
+
const result = findSourceFileWorker(fileName, isDefaultLib, reason, packageId);
|
128599
128572
|
(_b2 = tracing) == null ? void 0 : _b2.pop();
|
128600
128573
|
return result;
|
128601
128574
|
}
|
@@ -128605,7 +128578,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128605
128578
|
const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
|
128606
128579
|
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
|
128607
128580
|
}
|
128608
|
-
function findSourceFileWorker(fileName, isDefaultLib,
|
128581
|
+
function findSourceFileWorker(fileName, isDefaultLib, reason, packageId) {
|
128609
128582
|
var _a2, _b2;
|
128610
128583
|
const path = toPath3(fileName);
|
128611
128584
|
if (useSourceOfProjectReferenceRedirect) {
|
@@ -128615,7 +128588,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128615
128588
|
if (realPath2 !== path) source = getRedirectFromOutput(realPath2);
|
128616
128589
|
}
|
128617
128590
|
if (source == null ? void 0 : source.source) {
|
128618
|
-
const file2 = findSourceFile(source.source, isDefaultLib,
|
128591
|
+
const file2 = findSourceFile(source.source, isDefaultLib, reason, packageId);
|
128619
128592
|
if (file2) addFileToFilesByName(
|
128620
128593
|
file2,
|
128621
128594
|
path,
|
@@ -128735,7 +128708,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128735
128708
|
filesByNameIgnoreCase.set(pathLowerCase, file);
|
128736
128709
|
}
|
128737
128710
|
}
|
128738
|
-
skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib;
|
128739
128711
|
if (!options.noResolve) {
|
128740
128712
|
processReferencedFiles(file, isDefaultLib);
|
128741
128713
|
processTypeReferenceDirectives(file);
|
@@ -128796,8 +128768,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128796
128768
|
processSourceFile(
|
128797
128769
|
resolveTripleslashReference(ref.fileName, file.fileName),
|
128798
128770
|
isDefaultLib,
|
128799
|
-
/*ignoreNoDefaultLib*/
|
128800
|
-
false,
|
128801
128771
|
/*packageId*/
|
128802
128772
|
void 0,
|
128803
128773
|
{ kind: 4 /* ReferenceFile */, file: file.path, index }
|
@@ -128838,8 +128808,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128838
128808
|
resolvedTypeReferenceDirective.resolvedFileName,
|
128839
128809
|
/*isDefaultLib*/
|
128840
128810
|
false,
|
128841
|
-
/*ignoreNoDefaultLib*/
|
128842
|
-
false,
|
128843
128811
|
resolvedTypeReferenceDirective.packageId,
|
128844
128812
|
reason
|
128845
128813
|
);
|
@@ -128859,6 +128827,7 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128859
128827
|
if (existing) return existing.actual;
|
128860
128828
|
const result = pathForLibFileWorker(libFileName);
|
128861
128829
|
(resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result);
|
128830
|
+
libFiles.add(toPath3(result.actual));
|
128862
128831
|
return result.actual;
|
128863
128832
|
}
|
128864
128833
|
function pathForLibFileWorker(libFileName) {
|
@@ -128917,8 +128886,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128917
128886
|
pathForLibFile(libFileName),
|
128918
128887
|
/*isDefaultLib*/
|
128919
128888
|
true,
|
128920
|
-
/*ignoreNoDefaultLib*/
|
128921
|
-
true,
|
128922
128889
|
{ kind: 7 /* LibReferenceDirective */, file: file.path, index }
|
128923
128890
|
);
|
128924
128891
|
} else {
|
@@ -128966,8 +128933,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
128966
128933
|
resolvedFileName,
|
128967
128934
|
/*isDefaultLib*/
|
128968
128935
|
false,
|
128969
|
-
/*ignoreNoDefaultLib*/
|
128970
|
-
false,
|
128971
128936
|
{ kind: 3 /* Import */, file: file.path, index },
|
128972
128937
|
resolution.packageId
|
128973
128938
|
);
|
@@ -130749,7 +130714,7 @@ function createBuilderProgramState(newProgram, oldState) {
|
|
130749
130714
|
}
|
130750
130715
|
if (canCopySemanticDiagnostics) {
|
130751
130716
|
if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) return;
|
130752
|
-
if (sourceFile
|
130717
|
+
if (newProgram.isSourceFileDefaultLibrary(sourceFile) && !copyLibFileDiagnostics) return;
|
130753
130718
|
const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
|
130754
130719
|
if (diagnostics) {
|
130755
130720
|
state.semanticDiagnosticsPerFile.set(
|
@@ -144640,7 +144605,6 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
144640
144605
|
typeReferenceDirectives: [],
|
144641
144606
|
libReferenceDirectives: [],
|
144642
144607
|
amdDependencies: [],
|
144643
|
-
hasNoDefaultLib: void 0,
|
144644
144608
|
moduleName: void 0
|
144645
144609
|
};
|
144646
144610
|
const importedFiles = [];
|
@@ -144949,7 +144913,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
144949
144913
|
importedFiles.push(decl.ref);
|
144950
144914
|
}
|
144951
144915
|
}
|
144952
|
-
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile:
|
144916
|
+
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: false, ambientExternalModules: void 0 };
|
144953
144917
|
} else {
|
144954
144918
|
let ambientModuleNames;
|
144955
144919
|
if (ambientExternalModules) {
|
@@ -144964,7 +144928,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
144964
144928
|
}
|
144965
144929
|
}
|
144966
144930
|
}
|
144967
|
-
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile:
|
144931
|
+
return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: false, ambientExternalModules: ambientModuleNames };
|
144968
144932
|
}
|
144969
144933
|
}
|
144970
144934
|
|
@@ -145338,8 +145302,7 @@ function transpileDeclaration(input, transpileOptions) {
|
|
145338
145302
|
true
|
145339
145303
|
);
|
145340
145304
|
}
|
145341
|
-
var barebonesLibContent =
|
145342
|
-
interface Boolean {}
|
145305
|
+
var barebonesLibContent = `interface Boolean {}
|
145343
145306
|
interface Function {}
|
145344
145307
|
interface CallableFunction {}
|
145345
145308
|
interface NewableFunction {}
|
@@ -145386,6 +145349,7 @@ function transpileWorker(input, transpileOptions, declaration) {
|
|
145386
145349
|
options.declaration = false;
|
145387
145350
|
options.declarationMap = false;
|
145388
145351
|
}
|
145352
|
+
options.noLib = !declaration;
|
145389
145353
|
const newLine = getNewLineCharacter(options);
|
145390
145354
|
const compilerHost = {
|
145391
145355
|
getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : fileName === normalizePath(barebonesLibName) ? barebonesLibSourceFile : void 0,
|
@@ -145433,8 +145397,7 @@ function transpileWorker(input, transpileOptions, declaration) {
|
|
145433
145397
|
}
|
145434
145398
|
let outputText;
|
145435
145399
|
let sourceMapText;
|
145436
|
-
const
|
145437
|
-
const program = createProgram(inputs, options, compilerHost);
|
145400
|
+
const program = createProgram([inputFileName], options, compilerHost);
|
145438
145401
|
if (transpileOptions.reportDiagnostics) {
|
145439
145402
|
addRange(
|
145440
145403
|
/*to*/
|
@@ -145503,7 +145466,7 @@ __export(ts_NavigateTo_exports, {
|
|
145503
145466
|
});
|
145504
145467
|
|
145505
145468
|
// src/services/navigateTo.ts
|
145506
|
-
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) {
|
145469
|
+
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program) {
|
145507
145470
|
const patternMatcher = createPatternMatcher(searchValue);
|
145508
145471
|
if (!patternMatcher) return emptyArray;
|
145509
145472
|
const rawItems = [];
|
@@ -145513,26 +145476,26 @@ function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue
|
|
145513
145476
|
if (excludeDtsFiles && sourceFile.isDeclarationFile) {
|
145514
145477
|
continue;
|
145515
145478
|
}
|
145516
|
-
if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) {
|
145479
|
+
if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile, program)) {
|
145517
145480
|
continue;
|
145518
145481
|
}
|
145519
145482
|
sourceFile.getNamedDeclarations().forEach((declarations, name) => {
|
145520
|
-
getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems);
|
145483
|
+
getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems, program);
|
145521
145484
|
});
|
145522
145485
|
}
|
145523
145486
|
rawItems.sort(compareNavigateToItems);
|
145524
145487
|
return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);
|
145525
145488
|
}
|
145526
|
-
function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) {
|
145527
|
-
return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file
|
145489
|
+
function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile, program) {
|
145490
|
+
return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || program.isSourceFileDefaultLibrary(file));
|
145528
145491
|
}
|
145529
|
-
function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) {
|
145492
|
+
function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems, program) {
|
145530
145493
|
const match = patternMatcher.getMatchForLastSegmentOfPattern(name);
|
145531
145494
|
if (!match) {
|
145532
145495
|
return;
|
145533
145496
|
}
|
145534
145497
|
for (const declaration of declarations) {
|
145535
|
-
if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile)) continue;
|
145498
|
+
if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile, program)) continue;
|
145536
145499
|
if (patternMatcher.patternContainsDots) {
|
145537
145500
|
const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);
|
145538
145501
|
if (fullMatch) {
|
@@ -145543,7 +145506,7 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke
|
|
145543
145506
|
}
|
145544
145507
|
}
|
145545
145508
|
}
|
145546
|
-
function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) {
|
145509
|
+
function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile, program) {
|
145547
145510
|
var _a;
|
145548
145511
|
switch (declaration.kind) {
|
145549
145512
|
case 274 /* ImportClause */:
|
@@ -145551,7 +145514,7 @@ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile
|
|
145551
145514
|
case 272 /* ImportEqualsDeclaration */:
|
145552
145515
|
const importer = checker.getSymbolAtLocation(declaration.name);
|
145553
145516
|
const imported = checker.getAliasedSymbol(importer);
|
145554
|
-
return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile)));
|
145517
|
+
return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile, program)));
|
145555
145518
|
default:
|
145556
145519
|
return true;
|
145557
145520
|
}
|
@@ -153359,7 +153322,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
153359
153322
|
function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) {
|
153360
153323
|
synchronizeHostData();
|
153361
153324
|
const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();
|
153362
|
-
return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles);
|
153325
|
+
return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program);
|
153363
153326
|
}
|
153364
153327
|
function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) {
|
153365
153328
|
synchronizeHostData();
|
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": "6.0.0-dev.
|
5
|
+
"version": "6.0.0-dev.20250925",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -115,5 +115,5 @@
|
|
115
115
|
"node": "20.1.0",
|
116
116
|
"npm": "8.19.4"
|
117
117
|
},
|
118
|
-
"gitHead": "
|
118
|
+
"gitHead": "96acaa52902feb1320e1d8ec8936b8669cca447d"
|
119
119
|
}
|