typescript 5.4.0-dev.20231116 → 5.4.0-dev.20231118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.esnext.disposable.d.ts +1 -1
- package/lib/tsc.js +2 -2
- package/lib/tsserver.js +24 -3
- package/lib/typescript.js +24 -3
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
|
@@ -43,7 +43,7 @@ interface SuppressedError extends Error {
|
|
|
43
43
|
suppressed: any;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
interface SuppressedErrorConstructor
|
|
46
|
+
interface SuppressedErrorConstructor {
|
|
47
47
|
new (error: any, suppressed: any, message?: string): SuppressedError;
|
|
48
48
|
(error: any, suppressed: any, message?: string): SuppressedError;
|
|
49
49
|
readonly prototype: SuppressedError;
|
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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20231118`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -82097,7 +82097,7 @@ function createTypeChecker(host) {
|
|
|
82097
82097
|
}
|
|
82098
82098
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
82099
82099
|
if (target === unknownSymbol) {
|
|
82100
|
-
return
|
|
82100
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
82101
82101
|
}
|
|
82102
82102
|
return !!(getSymbolFlags(
|
|
82103
82103
|
symbol,
|
package/lib/tsserver.js
CHANGED
|
@@ -2330,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2330
2330
|
|
|
2331
2331
|
// src/compiler/corePublic.ts
|
|
2332
2332
|
var versionMajorMinor = "5.4";
|
|
2333
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2333
|
+
var version = `${versionMajorMinor}.0-dev.20231118`;
|
|
2334
2334
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2335
2335
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2336
2336
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -86805,7 +86805,7 @@ function createTypeChecker(host) {
|
|
|
86805
86805
|
}
|
|
86806
86806
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
86807
86807
|
if (target === unknownSymbol) {
|
|
86808
|
-
return
|
|
86808
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
86809
86809
|
}
|
|
86810
86810
|
return !!(getSymbolFlags(
|
|
86811
86811
|
symbol,
|
|
@@ -133431,7 +133431,8 @@ function buildLinkParts(link, checker) {
|
|
|
133431
133431
|
if (text)
|
|
133432
133432
|
parts.push(linkTextPart(text));
|
|
133433
133433
|
} else {
|
|
133434
|
-
|
|
133434
|
+
const separator = suffix === 0 || link.text.charCodeAt(suffix) === 124 /* bar */ && name.charCodeAt(name.length - 1) !== 32 /* space */ ? " " : "";
|
|
133435
|
+
parts.push(linkTextPart(name + separator + text));
|
|
133435
133436
|
}
|
|
133436
133437
|
}
|
|
133437
133438
|
parts.push(linkPart("}"));
|
|
@@ -158924,6 +158925,9 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
|
|
|
158924
158925
|
if (!info || uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin)) || kind === 1 /* Global */ && symbolToSortTextMap && !shouldIncludeSymbol(symbol, symbolToSortTextMap)) {
|
|
158925
158926
|
continue;
|
|
158926
158927
|
}
|
|
158928
|
+
if (!isTypeOnlyLocation && isInJSFile(sourceFile) && symbolAppearsToBeTypeOnly(symbol)) {
|
|
158929
|
+
continue;
|
|
158930
|
+
}
|
|
158927
158931
|
const { name, needsConvertPropertyAccess } = info;
|
|
158928
158932
|
const originalSortText = (symbolToSortTextMap == null ? void 0 : symbolToSortTextMap[getSymbolId(symbol)]) ?? SortText.LocationPriority;
|
|
158929
158933
|
const sortText = isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : originalSortText;
|
|
@@ -159003,6 +159007,10 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
|
|
|
159003
159007
|
}
|
|
159004
159008
|
return !!(allFlags & 111551 /* Value */);
|
|
159005
159009
|
}
|
|
159010
|
+
function symbolAppearsToBeTypeOnly(symbol) {
|
|
159011
|
+
var _a;
|
|
159012
|
+
return !(symbol.flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(symbol.flags & 788968 /* Type */));
|
|
159013
|
+
}
|
|
159006
159014
|
}
|
|
159007
159015
|
function getLabelCompletionAtPosition(node) {
|
|
159008
159016
|
const entries = getLabelStatementCompletions(node);
|
|
@@ -163895,6 +163903,10 @@ var Core;
|
|
|
163895
163903
|
getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere);
|
|
163896
163904
|
return;
|
|
163897
163905
|
}
|
|
163906
|
+
if (isJSDocPropertyLikeTag(parent2) && parent2.isNameFirst && parent2.typeExpression && isJSDocTypeLiteral(parent2.typeExpression.type) && parent2.typeExpression.type.jsDocPropertyTags && length(parent2.typeExpression.type.jsDocPropertyTags)) {
|
|
163907
|
+
getReferencesAtJSDocTypeLiteral(parent2.typeExpression.type.jsDocPropertyTags, referenceLocation, search, state);
|
|
163908
|
+
return;
|
|
163909
|
+
}
|
|
163898
163910
|
const relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
|
|
163899
163911
|
if (!relatedSymbol) {
|
|
163900
163912
|
getReferenceForShorthandProperty(referenceSymbol, search, state);
|
|
@@ -163921,6 +163933,15 @@ var Core;
|
|
|
163921
163933
|
}
|
|
163922
163934
|
getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
|
|
163923
163935
|
}
|
|
163936
|
+
function getReferencesAtJSDocTypeLiteral(jsDocPropertyTags, referenceLocation, search, state) {
|
|
163937
|
+
const addRef = state.referenceAdder(search.symbol);
|
|
163938
|
+
addReference(referenceLocation, search.symbol, state);
|
|
163939
|
+
forEach(jsDocPropertyTags, (propTag) => {
|
|
163940
|
+
if (isQualifiedName(propTag.name)) {
|
|
163941
|
+
addRef(propTag.name.left);
|
|
163942
|
+
}
|
|
163943
|
+
});
|
|
163944
|
+
}
|
|
163924
163945
|
function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state, addReferencesHere, alwaysGetReferences) {
|
|
163925
163946
|
Debug.assert(!alwaysGetReferences || !!state.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled");
|
|
163926
163947
|
const { parent: parent2, propertyName, name } = exportSpecifier;
|
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.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20231118`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -84570,7 +84570,7 @@ ${lanes.join("\n")}
|
|
|
84570
84570
|
}
|
|
84571
84571
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
84572
84572
|
if (target === unknownSymbol) {
|
|
84573
|
-
return
|
|
84573
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
84574
84574
|
}
|
|
84575
84575
|
return !!(getSymbolFlags(
|
|
84576
84576
|
symbol,
|
|
@@ -131695,7 +131695,8 @@ ${lanes.join("\n")}
|
|
|
131695
131695
|
if (text)
|
|
131696
131696
|
parts.push(linkTextPart(text));
|
|
131697
131697
|
} else {
|
|
131698
|
-
|
|
131698
|
+
const separator = suffix === 0 || link.text.charCodeAt(suffix) === 124 /* bar */ && name.charCodeAt(name.length - 1) !== 32 /* space */ ? " " : "";
|
|
131699
|
+
parts.push(linkTextPart(name + separator + text));
|
|
131699
131700
|
}
|
|
131700
131701
|
}
|
|
131701
131702
|
parts.push(linkPart("}"));
|
|
@@ -158147,6 +158148,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158147
158148
|
if (!info || uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin)) || kind === 1 /* Global */ && symbolToSortTextMap && !shouldIncludeSymbol(symbol, symbolToSortTextMap)) {
|
|
158148
158149
|
continue;
|
|
158149
158150
|
}
|
|
158151
|
+
if (!isTypeOnlyLocation && isInJSFile(sourceFile) && symbolAppearsToBeTypeOnly(symbol)) {
|
|
158152
|
+
continue;
|
|
158153
|
+
}
|
|
158150
158154
|
const { name, needsConvertPropertyAccess } = info;
|
|
158151
158155
|
const originalSortText = (symbolToSortTextMap == null ? void 0 : symbolToSortTextMap[getSymbolId(symbol)]) ?? SortText.LocationPriority;
|
|
158152
158156
|
const sortText = isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : originalSortText;
|
|
@@ -158226,6 +158230,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158226
158230
|
}
|
|
158227
158231
|
return !!(allFlags & 111551 /* Value */);
|
|
158228
158232
|
}
|
|
158233
|
+
function symbolAppearsToBeTypeOnly(symbol) {
|
|
158234
|
+
var _a;
|
|
158235
|
+
return !(symbol.flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(symbol.flags & 788968 /* Type */));
|
|
158236
|
+
}
|
|
158229
158237
|
}
|
|
158230
158238
|
function getLabelCompletionAtPosition(node) {
|
|
158231
158239
|
const entries = getLabelStatementCompletions(node);
|
|
@@ -163197,6 +163205,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163197
163205
|
getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere);
|
|
163198
163206
|
return;
|
|
163199
163207
|
}
|
|
163208
|
+
if (isJSDocPropertyLikeTag(parent2) && parent2.isNameFirst && parent2.typeExpression && isJSDocTypeLiteral(parent2.typeExpression.type) && parent2.typeExpression.type.jsDocPropertyTags && length(parent2.typeExpression.type.jsDocPropertyTags)) {
|
|
163209
|
+
getReferencesAtJSDocTypeLiteral(parent2.typeExpression.type.jsDocPropertyTags, referenceLocation, search, state);
|
|
163210
|
+
return;
|
|
163211
|
+
}
|
|
163200
163212
|
const relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
|
|
163201
163213
|
if (!relatedSymbol) {
|
|
163202
163214
|
getReferenceForShorthandProperty(referenceSymbol, search, state);
|
|
@@ -163223,6 +163235,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163223
163235
|
}
|
|
163224
163236
|
getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
|
|
163225
163237
|
}
|
|
163238
|
+
function getReferencesAtJSDocTypeLiteral(jsDocPropertyTags, referenceLocation, search, state) {
|
|
163239
|
+
const addRef = state.referenceAdder(search.symbol);
|
|
163240
|
+
addReference(referenceLocation, search.symbol, state);
|
|
163241
|
+
forEach(jsDocPropertyTags, (propTag) => {
|
|
163242
|
+
if (isQualifiedName(propTag.name)) {
|
|
163243
|
+
addRef(propTag.name.left);
|
|
163244
|
+
}
|
|
163245
|
+
});
|
|
163246
|
+
}
|
|
163226
163247
|
function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state, addReferencesHere, alwaysGetReferences) {
|
|
163227
163248
|
Debug.assert(!alwaysGetReferences || !!state.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled");
|
|
163228
163249
|
const { parent: parent2, propertyName, name } = exportSpecifier;
|
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.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231118`;
|
|
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.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20231118",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "bb13ec01f28a3a112bf69218ee7c687b52ea87d3"
|
|
118
118
|
}
|