typescript 5.3.0-dev.20231003 → 5.3.0-dev.20231005
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 +22 -13
- package/lib/tsserver.js +45 -20
- package/lib/typescript.js +45 -20
- package/lib/typingsInstaller.js +1 -1
- 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.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20231005`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -42361,10 +42361,12 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo
|
|
|
42361
42361
|
importingSourceFile,
|
|
42362
42362
|
host,
|
|
42363
42363
|
userPreferences,
|
|
42364
|
-
options
|
|
42364
|
+
options,
|
|
42365
|
+
/*forAutoImport*/
|
|
42366
|
+
false
|
|
42365
42367
|
).moduleSpecifiers;
|
|
42366
42368
|
}
|
|
42367
|
-
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
|
|
42369
|
+
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
|
|
42368
42370
|
let computedWithoutCache = false;
|
|
42369
42371
|
const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
|
|
42370
42372
|
if (ambient)
|
|
@@ -42382,11 +42384,19 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions
|
|
|
42382
42384
|
return { moduleSpecifiers: emptyArray, computedWithoutCache };
|
|
42383
42385
|
computedWithoutCache = true;
|
|
42384
42386
|
modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
|
|
42385
|
-
const result = computeModuleSpecifiers(
|
|
42387
|
+
const result = computeModuleSpecifiers(
|
|
42388
|
+
modulePaths,
|
|
42389
|
+
compilerOptions,
|
|
42390
|
+
importingSourceFile,
|
|
42391
|
+
host,
|
|
42392
|
+
userPreferences,
|
|
42393
|
+
options,
|
|
42394
|
+
forAutoImport
|
|
42395
|
+
);
|
|
42386
42396
|
cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
|
|
42387
42397
|
return { moduleSpecifiers: result, computedWithoutCache };
|
|
42388
42398
|
}
|
|
42389
|
-
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
|
|
42399
|
+
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
|
|
42390
42400
|
const info = getInfo(importingSourceFile.path, host);
|
|
42391
42401
|
const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
|
|
42392
42402
|
const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
|
|
@@ -42443,7 +42453,7 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
|
|
|
42443
42453
|
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
42444
42454
|
} else if (pathIsBareSpecifier(local)) {
|
|
42445
42455
|
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
42446
|
-
} else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
42456
|
+
} else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
42447
42457
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
42448
42458
|
}
|
|
42449
42459
|
}
|
|
@@ -68821,7 +68831,7 @@ function createTypeChecker(host) {
|
|
|
68821
68831
|
}
|
|
68822
68832
|
}
|
|
68823
68833
|
const parent = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0;
|
|
68824
|
-
if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
|
|
68834
|
+
if (parent && parent.openingElement === openingLikeElement && getSemanticJsxChildren(parent.children).length > 0) {
|
|
68825
68835
|
const childrenTypes = checkJsxChildren(parent, checkMode);
|
|
68826
68836
|
if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
|
|
68827
68837
|
if (explicitlySpecifyChildrenAttribute) {
|
|
@@ -70444,9 +70454,11 @@ function createTypeChecker(host) {
|
|
|
70444
70454
|
}
|
|
70445
70455
|
if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {
|
|
70446
70456
|
names.push(arg.tupleNameSource);
|
|
70457
|
+
} else {
|
|
70458
|
+
names.push(void 0);
|
|
70447
70459
|
}
|
|
70448
70460
|
}
|
|
70449
|
-
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType),
|
|
70461
|
+
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);
|
|
70450
70462
|
}
|
|
70451
70463
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
70452
70464
|
const isJavascript = isInJSFile(signature.declaration);
|
|
@@ -72581,12 +72593,9 @@ function createTypeChecker(host) {
|
|
|
72581
72593
|
types.push(restType);
|
|
72582
72594
|
flags.push(8 /* Variadic */);
|
|
72583
72595
|
}
|
|
72584
|
-
|
|
72585
|
-
if (name) {
|
|
72586
|
-
names.push(name);
|
|
72587
|
-
}
|
|
72596
|
+
names.push(getNameableDeclarationAtPosition(source, i));
|
|
72588
72597
|
}
|
|
72589
|
-
return createTupleType(types, flags, readonly,
|
|
72598
|
+
return createTupleType(types, flags, readonly, names);
|
|
72590
72599
|
}
|
|
72591
72600
|
function getParameterCount(signature) {
|
|
72592
72601
|
const length2 = signature.parameters.length;
|
package/lib/tsserver.js
CHANGED
|
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/compiler/corePublic.ts
|
|
2330
2330
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-dev.20231005`;
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -47073,10 +47073,12 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo
|
|
|
47073
47073
|
importingSourceFile,
|
|
47074
47074
|
host,
|
|
47075
47075
|
userPreferences,
|
|
47076
|
-
options
|
|
47076
|
+
options,
|
|
47077
|
+
/*forAutoImport*/
|
|
47078
|
+
false
|
|
47077
47079
|
).moduleSpecifiers;
|
|
47078
47080
|
}
|
|
47079
|
-
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
|
|
47081
|
+
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
|
|
47080
47082
|
let computedWithoutCache = false;
|
|
47081
47083
|
const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
|
|
47082
47084
|
if (ambient)
|
|
@@ -47094,11 +47096,19 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions
|
|
|
47094
47096
|
return { moduleSpecifiers: emptyArray, computedWithoutCache };
|
|
47095
47097
|
computedWithoutCache = true;
|
|
47096
47098
|
modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
|
|
47097
|
-
const result = computeModuleSpecifiers(
|
|
47099
|
+
const result = computeModuleSpecifiers(
|
|
47100
|
+
modulePaths,
|
|
47101
|
+
compilerOptions,
|
|
47102
|
+
importingSourceFile,
|
|
47103
|
+
host,
|
|
47104
|
+
userPreferences,
|
|
47105
|
+
options,
|
|
47106
|
+
forAutoImport
|
|
47107
|
+
);
|
|
47098
47108
|
cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
|
|
47099
47109
|
return { moduleSpecifiers: result, computedWithoutCache };
|
|
47100
47110
|
}
|
|
47101
|
-
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
|
|
47111
|
+
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
|
|
47102
47112
|
const info = getInfo(importingSourceFile.path, host);
|
|
47103
47113
|
const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
|
|
47104
47114
|
const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
|
|
@@ -47155,7 +47165,7 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
|
|
|
47155
47165
|
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
47156
47166
|
} else if (pathIsBareSpecifier(local)) {
|
|
47157
47167
|
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
47158
|
-
} else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
47168
|
+
} else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
47159
47169
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
47160
47170
|
}
|
|
47161
47171
|
}
|
|
@@ -73533,7 +73543,7 @@ function createTypeChecker(host) {
|
|
|
73533
73543
|
}
|
|
73534
73544
|
}
|
|
73535
73545
|
const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0;
|
|
73536
|
-
if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) {
|
|
73546
|
+
if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) {
|
|
73537
73547
|
const childrenTypes = checkJsxChildren(parent2, checkMode);
|
|
73538
73548
|
if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
|
|
73539
73549
|
if (explicitlySpecifyChildrenAttribute) {
|
|
@@ -75156,9 +75166,11 @@ function createTypeChecker(host) {
|
|
|
75156
75166
|
}
|
|
75157
75167
|
if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {
|
|
75158
75168
|
names.push(arg.tupleNameSource);
|
|
75169
|
+
} else {
|
|
75170
|
+
names.push(void 0);
|
|
75159
75171
|
}
|
|
75160
75172
|
}
|
|
75161
|
-
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType),
|
|
75173
|
+
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);
|
|
75162
75174
|
}
|
|
75163
75175
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
75164
75176
|
const isJavascript = isInJSFile(signature.declaration);
|
|
@@ -77293,12 +77305,9 @@ function createTypeChecker(host) {
|
|
|
77293
77305
|
types.push(restType);
|
|
77294
77306
|
flags.push(8 /* Variadic */);
|
|
77295
77307
|
}
|
|
77296
|
-
|
|
77297
|
-
if (name) {
|
|
77298
|
-
names.push(name);
|
|
77299
|
-
}
|
|
77308
|
+
names.push(getNameableDeclarationAtPosition(source, i));
|
|
77300
77309
|
}
|
|
77301
|
-
return createTupleType(types, flags, readonly,
|
|
77310
|
+
return createTupleType(types, flags, readonly, names);
|
|
77302
77311
|
}
|
|
77303
77312
|
function getParameterCount(signature) {
|
|
77304
77313
|
const length2 = signature.parameters.length;
|
|
@@ -150092,7 +150101,18 @@ function getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUs
|
|
|
150092
150101
|
const getChecker = createGetChecker(program, host);
|
|
150093
150102
|
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
150094
150103
|
const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution);
|
|
150095
|
-
const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(
|
|
150104
|
+
const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(
|
|
150105
|
+
moduleSymbol,
|
|
150106
|
+
checker,
|
|
150107
|
+
compilerOptions,
|
|
150108
|
+
sourceFile,
|
|
150109
|
+
moduleSpecifierResolutionHost,
|
|
150110
|
+
preferences,
|
|
150111
|
+
/*options*/
|
|
150112
|
+
void 0,
|
|
150113
|
+
/*forAutoImport*/
|
|
150114
|
+
true
|
|
150115
|
+
);
|
|
150096
150116
|
let computedWithoutCacheCount = 0;
|
|
150097
150117
|
const fixes = flatMap(exportInfo, (exportInfo2, i) => {
|
|
150098
150118
|
const checker = getChecker(exportInfo2.isFromPackageJson);
|
|
@@ -164285,6 +164305,7 @@ function provideInlayHints(context) {
|
|
|
164285
164305
|
const { file, program, span, cancellationToken, preferences } = context;
|
|
164286
164306
|
const sourceFileText = file.text;
|
|
164287
164307
|
const compilerOptions = program.getCompilerOptions();
|
|
164308
|
+
const quotePreference = getQuotePreference(file, preferences);
|
|
164288
164309
|
const checker = program.getTypeChecker();
|
|
164289
164310
|
const result = [];
|
|
164290
164311
|
visitor(file);
|
|
@@ -164592,6 +164613,10 @@ function provideInlayHints(context) {
|
|
|
164592
164613
|
parts.push({ text: tokenString });
|
|
164593
164614
|
return;
|
|
164594
164615
|
}
|
|
164616
|
+
if (isLiteralExpression(node)) {
|
|
164617
|
+
parts.push({ text: getLiteralText2(node) });
|
|
164618
|
+
return;
|
|
164619
|
+
}
|
|
164595
164620
|
switch (node.kind) {
|
|
164596
164621
|
case 80 /* Identifier */:
|
|
164597
164622
|
const identifier = node;
|
|
@@ -164603,12 +164628,6 @@ function provideInlayHints(context) {
|
|
|
164603
164628
|
parts.push({ text: identifierText });
|
|
164604
164629
|
}
|
|
164605
164630
|
break;
|
|
164606
|
-
case 9 /* NumericLiteral */:
|
|
164607
|
-
parts.push({ text: node.text });
|
|
164608
|
-
break;
|
|
164609
|
-
case 11 /* StringLiteral */:
|
|
164610
|
-
parts.push({ text: `"${node.text}"` });
|
|
164611
|
-
break;
|
|
164612
164631
|
case 166 /* QualifiedName */:
|
|
164613
164632
|
const qualifiedName = node;
|
|
164614
164633
|
visitForDisplayParts(qualifiedName.left);
|
|
@@ -164864,6 +164883,12 @@ function provideInlayHints(context) {
|
|
|
164864
164883
|
visitForDisplayParts(node);
|
|
164865
164884
|
});
|
|
164866
164885
|
}
|
|
164886
|
+
function getLiteralText2(node) {
|
|
164887
|
+
if (isStringLiteral(node)) {
|
|
164888
|
+
return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
|
|
164889
|
+
}
|
|
164890
|
+
return node.text;
|
|
164891
|
+
}
|
|
164867
164892
|
}
|
|
164868
164893
|
function isUndefined(name) {
|
|
164869
164894
|
return name === "undefined";
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20231005`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -44938,10 +44938,12 @@ ${lanes.join("\n")}
|
|
|
44938
44938
|
importingSourceFile,
|
|
44939
44939
|
host,
|
|
44940
44940
|
userPreferences,
|
|
44941
|
-
options
|
|
44941
|
+
options,
|
|
44942
|
+
/*forAutoImport*/
|
|
44943
|
+
false
|
|
44942
44944
|
).moduleSpecifiers;
|
|
44943
44945
|
}
|
|
44944
|
-
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
|
|
44946
|
+
function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
|
|
44945
44947
|
let computedWithoutCache = false;
|
|
44946
44948
|
const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
|
|
44947
44949
|
if (ambient)
|
|
@@ -44959,11 +44961,19 @@ ${lanes.join("\n")}
|
|
|
44959
44961
|
return { moduleSpecifiers: emptyArray, computedWithoutCache };
|
|
44960
44962
|
computedWithoutCache = true;
|
|
44961
44963
|
modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
|
|
44962
|
-
const result = computeModuleSpecifiers(
|
|
44964
|
+
const result = computeModuleSpecifiers(
|
|
44965
|
+
modulePaths,
|
|
44966
|
+
compilerOptions,
|
|
44967
|
+
importingSourceFile,
|
|
44968
|
+
host,
|
|
44969
|
+
userPreferences,
|
|
44970
|
+
options,
|
|
44971
|
+
forAutoImport
|
|
44972
|
+
);
|
|
44963
44973
|
cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
|
|
44964
44974
|
return { moduleSpecifiers: result, computedWithoutCache };
|
|
44965
44975
|
}
|
|
44966
|
-
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
|
|
44976
|
+
function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
|
|
44967
44977
|
const info = getInfo(importingSourceFile.path, host);
|
|
44968
44978
|
const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
|
|
44969
44979
|
const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
|
|
@@ -45020,7 +45030,7 @@ ${lanes.join("\n")}
|
|
|
45020
45030
|
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
45021
45031
|
} else if (pathIsBareSpecifier(local)) {
|
|
45022
45032
|
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
45023
|
-
} else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
45033
|
+
} else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
45024
45034
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
45025
45035
|
}
|
|
45026
45036
|
}
|
|
@@ -71300,7 +71310,7 @@ ${lanes.join("\n")}
|
|
|
71300
71310
|
}
|
|
71301
71311
|
}
|
|
71302
71312
|
const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0;
|
|
71303
|
-
if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) {
|
|
71313
|
+
if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) {
|
|
71304
71314
|
const childrenTypes = checkJsxChildren(parent2, checkMode);
|
|
71305
71315
|
if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
|
|
71306
71316
|
if (explicitlySpecifyChildrenAttribute) {
|
|
@@ -72923,9 +72933,11 @@ ${lanes.join("\n")}
|
|
|
72923
72933
|
}
|
|
72924
72934
|
if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {
|
|
72925
72935
|
names.push(arg.tupleNameSource);
|
|
72936
|
+
} else {
|
|
72937
|
+
names.push(void 0);
|
|
72926
72938
|
}
|
|
72927
72939
|
}
|
|
72928
|
-
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType),
|
|
72940
|
+
return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);
|
|
72929
72941
|
}
|
|
72930
72942
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
72931
72943
|
const isJavascript = isInJSFile(signature.declaration);
|
|
@@ -75060,12 +75072,9 @@ ${lanes.join("\n")}
|
|
|
75060
75072
|
types.push(restType);
|
|
75061
75073
|
flags.push(8 /* Variadic */);
|
|
75062
75074
|
}
|
|
75063
|
-
|
|
75064
|
-
if (name) {
|
|
75065
|
-
names.push(name);
|
|
75066
|
-
}
|
|
75075
|
+
names.push(getNameableDeclarationAtPosition(source, i));
|
|
75067
75076
|
}
|
|
75068
|
-
return createTupleType(types, flags, readonly,
|
|
75077
|
+
return createTupleType(types, flags, readonly, names);
|
|
75069
75078
|
}
|
|
75070
75079
|
function getParameterCount(signature) {
|
|
75071
75080
|
const length2 = signature.parameters.length;
|
|
@@ -148812,7 +148821,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148812
148821
|
const getChecker = createGetChecker(program, host);
|
|
148813
148822
|
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
148814
148823
|
const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution);
|
|
148815
|
-
const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(
|
|
148824
|
+
const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(
|
|
148825
|
+
moduleSymbol,
|
|
148826
|
+
checker,
|
|
148827
|
+
compilerOptions,
|
|
148828
|
+
sourceFile,
|
|
148829
|
+
moduleSpecifierResolutionHost,
|
|
148830
|
+
preferences,
|
|
148831
|
+
/*options*/
|
|
148832
|
+
void 0,
|
|
148833
|
+
/*forAutoImport*/
|
|
148834
|
+
true
|
|
148835
|
+
);
|
|
148816
148836
|
let computedWithoutCacheCount = 0;
|
|
148817
148837
|
const fixes = flatMap(exportInfo, (exportInfo2, i) => {
|
|
148818
148838
|
const checker = getChecker(exportInfo2.isFromPackageJson);
|
|
@@ -163630,6 +163650,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163630
163650
|
const { file, program, span, cancellationToken, preferences } = context;
|
|
163631
163651
|
const sourceFileText = file.text;
|
|
163632
163652
|
const compilerOptions = program.getCompilerOptions();
|
|
163653
|
+
const quotePreference = getQuotePreference(file, preferences);
|
|
163633
163654
|
const checker = program.getTypeChecker();
|
|
163634
163655
|
const result = [];
|
|
163635
163656
|
visitor(file);
|
|
@@ -163937,6 +163958,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163937
163958
|
parts.push({ text: tokenString });
|
|
163938
163959
|
return;
|
|
163939
163960
|
}
|
|
163961
|
+
if (isLiteralExpression(node)) {
|
|
163962
|
+
parts.push({ text: getLiteralText2(node) });
|
|
163963
|
+
return;
|
|
163964
|
+
}
|
|
163940
163965
|
switch (node.kind) {
|
|
163941
163966
|
case 80 /* Identifier */:
|
|
163942
163967
|
const identifier = node;
|
|
@@ -163948,12 +163973,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163948
163973
|
parts.push({ text: identifierText });
|
|
163949
163974
|
}
|
|
163950
163975
|
break;
|
|
163951
|
-
case 9 /* NumericLiteral */:
|
|
163952
|
-
parts.push({ text: node.text });
|
|
163953
|
-
break;
|
|
163954
|
-
case 11 /* StringLiteral */:
|
|
163955
|
-
parts.push({ text: `"${node.text}"` });
|
|
163956
|
-
break;
|
|
163957
163976
|
case 166 /* QualifiedName */:
|
|
163958
163977
|
const qualifiedName = node;
|
|
163959
163978
|
visitForDisplayParts(qualifiedName.left);
|
|
@@ -164209,6 +164228,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164209
164228
|
visitForDisplayParts(node);
|
|
164210
164229
|
});
|
|
164211
164230
|
}
|
|
164231
|
+
function getLiteralText2(node) {
|
|
164232
|
+
if (isStringLiteral(node)) {
|
|
164233
|
+
return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
|
|
164234
|
+
}
|
|
164235
|
+
return node.text;
|
|
164236
|
+
}
|
|
164212
164237
|
}
|
|
164213
164238
|
function isUndefined(name) {
|
|
164214
164239
|
return name === "undefined";
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231005`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
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.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20231005",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "e9f68cb2969751ce2a6df8b5ee9bbfb08afb41e1"
|
|
117
117
|
}
|