typescript 5.9.0-dev.20250623 → 5.9.0-dev.20250625
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 +15 -4
- package/lib/typescript.js +49 -37
- package/package.json +2 -2
package/lib/_tsc.js
CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
18
18
|
|
19
19
|
// src/compiler/corePublic.ts
|
20
20
|
var versionMajorMinor = "5.9";
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20250625`;
|
22
22
|
|
23
23
|
// src/compiler/core.ts
|
24
24
|
var emptyArray = [];
|
@@ -17198,8 +17198,14 @@ function base64encode(host, input) {
|
|
17198
17198
|
function readJsonOrUndefined(path, hostOrText) {
|
17199
17199
|
const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path);
|
17200
17200
|
if (!jsonText) return void 0;
|
17201
|
-
|
17202
|
-
|
17201
|
+
let result = tryParseJson(jsonText);
|
17202
|
+
if (result === void 0) {
|
17203
|
+
const looseResult = parseConfigFileTextToJson(path, jsonText);
|
17204
|
+
if (!looseResult.error) {
|
17205
|
+
result = looseResult.config;
|
17206
|
+
}
|
17207
|
+
}
|
17208
|
+
return result;
|
17203
17209
|
}
|
17204
17210
|
function readJson(path, host) {
|
17205
17211
|
return readJsonOrUndefined(path, host) || {};
|
@@ -31211,6 +31217,7 @@ var Parser;
|
|
31211
31217
|
/*skipKeyword*/
|
31212
31218
|
true
|
31213
31219
|
);
|
31220
|
+
parseOptional(28 /* CommaToken */);
|
31214
31221
|
if (!parseExpected(20 /* CloseBraceToken */)) {
|
31215
31222
|
const lastError = lastOrUndefined(parseDiagnostics);
|
31216
31223
|
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
@@ -67432,9 +67439,13 @@ function createTypeChecker(host) {
|
|
67432
67439
|
return types[0];
|
67433
67440
|
}
|
67434
67441
|
const primaryTypes = strictNullChecks ? sameMap(types, (t) => filterType(t, (u) => !(u.flags & 98304 /* Nullable */))) : types;
|
67435
|
-
const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) :
|
67442
|
+
const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : getSingleCommonSupertype(primaryTypes);
|
67436
67443
|
return primaryTypes === types ? superTypeOrUnion : getNullableType(superTypeOrUnion, getCombinedTypeFlags(types) & 98304 /* Nullable */);
|
67437
67444
|
}
|
67445
|
+
function getSingleCommonSupertype(types) {
|
67446
|
+
const candidate = reduceLeft(types, (s, t) => isTypeStrictSubtypeOf(s, t) ? t : s);
|
67447
|
+
return every(types, (t) => t === candidate || isTypeStrictSubtypeOf(t, candidate)) ? candidate : reduceLeft(types, (s, t) => isTypeSubtypeOf(s, t) ? t : s);
|
67448
|
+
}
|
67438
67449
|
function getCommonSubtype(types) {
|
67439
67450
|
return reduceLeft(types, (s, t) => isTypeSubtypeOf(t, s) ? t : s);
|
67440
67451
|
}
|
package/lib/typescript.js
CHANGED
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
2285
2285
|
|
2286
2286
|
// src/compiler/corePublic.ts
|
2287
2287
|
var versionMajorMinor = "5.9";
|
2288
|
-
var version = `${versionMajorMinor}.0-dev.
|
2288
|
+
var version = `${versionMajorMinor}.0-dev.20250625`;
|
2289
2289
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
2290
2290
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
2291
2291
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
@@ -21084,8 +21084,14 @@ function base64decode(host, input) {
|
|
21084
21084
|
function readJsonOrUndefined(path, hostOrText) {
|
21085
21085
|
const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path);
|
21086
21086
|
if (!jsonText) return void 0;
|
21087
|
-
|
21088
|
-
|
21087
|
+
let result = tryParseJson(jsonText);
|
21088
|
+
if (result === void 0) {
|
21089
|
+
const looseResult = parseConfigFileTextToJson(path, jsonText);
|
21090
|
+
if (!looseResult.error) {
|
21091
|
+
result = looseResult.config;
|
21092
|
+
}
|
21093
|
+
}
|
21094
|
+
return result;
|
21089
21095
|
}
|
21090
21096
|
function readJson(path, host) {
|
21091
21097
|
return readJsonOrUndefined(path, host) || {};
|
@@ -35472,6 +35478,7 @@ var Parser;
|
|
35472
35478
|
/*skipKeyword*/
|
35473
35479
|
true
|
35474
35480
|
);
|
35481
|
+
parseOptional(28 /* CommaToken */);
|
35475
35482
|
if (!parseExpected(20 /* CloseBraceToken */)) {
|
35476
35483
|
const lastError = lastOrUndefined(parseDiagnostics);
|
35477
35484
|
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
@@ -72043,9 +72050,13 @@ function createTypeChecker(host) {
|
|
72043
72050
|
return types[0];
|
72044
72051
|
}
|
72045
72052
|
const primaryTypes = strictNullChecks ? sameMap(types, (t) => filterType(t, (u) => !(u.flags & 98304 /* Nullable */))) : types;
|
72046
|
-
const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) :
|
72053
|
+
const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : getSingleCommonSupertype(primaryTypes);
|
72047
72054
|
return primaryTypes === types ? superTypeOrUnion : getNullableType(superTypeOrUnion, getCombinedTypeFlags(types) & 98304 /* Nullable */);
|
72048
72055
|
}
|
72056
|
+
function getSingleCommonSupertype(types) {
|
72057
|
+
const candidate = reduceLeft(types, (s, t) => isTypeStrictSubtypeOf(s, t) ? t : s);
|
72058
|
+
return every(types, (t) => t === candidate || isTypeStrictSubtypeOf(t, candidate)) ? candidate : reduceLeft(types, (s, t) => isTypeSubtypeOf(s, t) ? t : s);
|
72059
|
+
}
|
72049
72060
|
function getCommonSubtype(types) {
|
72050
72061
|
return reduceLeft(types, (s, t) => isTypeSubtypeOf(t, s) ? t : s);
|
72051
72062
|
}
|
@@ -139324,6 +139335,9 @@ function getMeaningFromRightHandSideOfImportEquals(node) {
|
|
139324
139335
|
return name && name.parent.kind === 272 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */;
|
139325
139336
|
}
|
139326
139337
|
function isInRightSideOfInternalImportEqualsDeclaration(node) {
|
139338
|
+
if (!node.parent) {
|
139339
|
+
return false;
|
139340
|
+
}
|
139327
139341
|
while (node.parent.kind === 167 /* QualifiedName */) {
|
139328
139342
|
node = node.parent;
|
139329
139343
|
}
|
@@ -168297,48 +168311,46 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
|
|
168297
168311
|
function shouldIncludeSymbol(symbol, symbolToSortTextMap2) {
|
168298
168312
|
var _a;
|
168299
168313
|
let allFlags = symbol.flags;
|
168300
|
-
if (
|
168301
|
-
|
168302
|
-
|
168314
|
+
if (location.parent && isExportAssignment(location.parent)) {
|
168315
|
+
return true;
|
168316
|
+
}
|
168317
|
+
if (closestSymbolDeclaration && tryCast(closestSymbolDeclaration, isVariableDeclaration)) {
|
168318
|
+
if (symbol.valueDeclaration === closestSymbolDeclaration) {
|
168319
|
+
return false;
|
168303
168320
|
}
|
168304
|
-
if (closestSymbolDeclaration &&
|
168305
|
-
|
168321
|
+
if (isBindingPattern(closestSymbolDeclaration.name) && closestSymbolDeclaration.name.elements.some((e) => e === symbol.valueDeclaration)) {
|
168322
|
+
return false;
|
168323
|
+
}
|
168324
|
+
}
|
168325
|
+
const symbolDeclaration = symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
|
168326
|
+
if (closestSymbolDeclaration && symbolDeclaration) {
|
168327
|
+
if (isParameter(closestSymbolDeclaration) && isParameter(symbolDeclaration)) {
|
168328
|
+
const parameters = closestSymbolDeclaration.parent.parameters;
|
168329
|
+
if (symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < parameters.end) {
|
168306
168330
|
return false;
|
168307
168331
|
}
|
168308
|
-
|
168332
|
+
} else if (isTypeParameterDeclaration(closestSymbolDeclaration) && isTypeParameterDeclaration(symbolDeclaration)) {
|
168333
|
+
if (closestSymbolDeclaration === symbolDeclaration && (contextToken == null ? void 0 : contextToken.kind) === 96 /* ExtendsKeyword */) {
|
168309
168334
|
return false;
|
168310
168335
|
}
|
168311
|
-
|
168312
|
-
|
168313
|
-
|
168314
|
-
if (isParameter(closestSymbolDeclaration) && isParameter(symbolDeclaration)) {
|
168315
|
-
const parameters = closestSymbolDeclaration.parent.parameters;
|
168316
|
-
if (symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < parameters.end) {
|
168336
|
+
if (isInTypeParameterDefault(contextToken) && !isInferTypeNode(closestSymbolDeclaration.parent)) {
|
168337
|
+
const typeParameters = closestSymbolDeclaration.parent.typeParameters;
|
168338
|
+
if (typeParameters && symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < typeParameters.end) {
|
168317
168339
|
return false;
|
168318
168340
|
}
|
168319
|
-
} else if (isTypeParameterDeclaration(closestSymbolDeclaration) && isTypeParameterDeclaration(symbolDeclaration)) {
|
168320
|
-
if (closestSymbolDeclaration === symbolDeclaration && (contextToken == null ? void 0 : contextToken.kind) === 96 /* ExtendsKeyword */) {
|
168321
|
-
return false;
|
168322
|
-
}
|
168323
|
-
if (isInTypeParameterDefault(contextToken) && !isInferTypeNode(closestSymbolDeclaration.parent)) {
|
168324
|
-
const typeParameters = closestSymbolDeclaration.parent.typeParameters;
|
168325
|
-
if (typeParameters && symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < typeParameters.end) {
|
168326
|
-
return false;
|
168327
|
-
}
|
168328
|
-
}
|
168329
168341
|
}
|
168330
168342
|
}
|
168331
|
-
|
168332
|
-
|
168333
|
-
|
168334
|
-
|
168335
|
-
|
168336
|
-
|
168337
|
-
|
168338
|
-
|
168339
|
-
|
168340
|
-
|
168341
|
-
|
168343
|
+
}
|
168344
|
+
const symbolOrigin = skipAlias(symbol, typeChecker);
|
168345
|
+
if (!!sourceFile.externalModuleIndicator && !compilerOptions.allowUmdGlobalAccess && symbolToSortTextMap2[getSymbolId(symbol)] === SortText.GlobalsOrKeywords && (symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.AutoImportSuggestions || symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.LocationPriority)) {
|
168346
|
+
return false;
|
168347
|
+
}
|
168348
|
+
allFlags |= getCombinedLocalAndExportSymbolFlags(symbolOrigin);
|
168349
|
+
if (isInRightSideOfInternalImportEqualsDeclaration(location)) {
|
168350
|
+
return !!(allFlags & 1920 /* Namespace */);
|
168351
|
+
}
|
168352
|
+
if (isTypeOnlyLocation) {
|
168353
|
+
return symbolCanBeReferencedAtTypeLocation(symbol, typeChecker);
|
168342
168354
|
}
|
168343
168355
|
return !!(allFlags & 111551 /* Value */);
|
168344
168356
|
}
|
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": "5.9.0-dev.
|
5
|
+
"version": "5.9.0-dev.20250625",
|
6
6
|
"license": "Apache-2.0",
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
8
8
|
"keywords": [
|
@@ -116,5 +116,5 @@
|
|
116
116
|
"node": "20.1.0",
|
117
117
|
"npm": "8.19.4"
|
118
118
|
},
|
119
|
-
"gitHead": "
|
119
|
+
"gitHead": "e6a50a78619632bba7af4f23b2e7e4940b9cf788"
|
120
120
|
}
|