typescript 5.3.0-dev.20231005 → 5.3.0-dev.20231006
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 +36 -6
- package/lib/tsserver.js +40 -7
- package/lib/typescript.js +40 -7
- 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.20231006`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -45518,7 +45518,7 @@ function createTypeChecker(host) {
|
|
|
45518
45518
|
return resolved;
|
|
45519
45519
|
}
|
|
45520
45520
|
function isSyntacticDefault(node) {
|
|
45521
|
-
return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node);
|
|
45521
|
+
return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node);
|
|
45522
45522
|
}
|
|
45523
45523
|
function getUsageModeForExpression(usage) {
|
|
45524
45524
|
return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0;
|
|
@@ -48476,6 +48476,28 @@ function createTypeChecker(host) {
|
|
|
48476
48476
|
const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
|
|
48477
48477
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
48478
48478
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
|
48479
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
48480
|
+
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
48481
|
+
if (propertyType !== writeType) {
|
|
48482
|
+
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
48483
|
+
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
48484
|
+
typeElements.push(
|
|
48485
|
+
setCommentRange(
|
|
48486
|
+
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
48487
|
+
getterDeclaration
|
|
48488
|
+
)
|
|
48489
|
+
);
|
|
48490
|
+
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
48491
|
+
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
48492
|
+
typeElements.push(
|
|
48493
|
+
setCommentRange(
|
|
48494
|
+
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
48495
|
+
setterDeclaration
|
|
48496
|
+
)
|
|
48497
|
+
);
|
|
48498
|
+
return;
|
|
48499
|
+
}
|
|
48500
|
+
}
|
|
48479
48501
|
const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
|
|
48480
48502
|
if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
|
|
48481
48503
|
const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);
|
|
@@ -48513,9 +48535,9 @@ function createTypeChecker(host) {
|
|
|
48513
48535
|
typeElements.push(preserveCommentsOn(propertySignature));
|
|
48514
48536
|
function preserveCommentsOn(node) {
|
|
48515
48537
|
var _a2;
|
|
48516
|
-
|
|
48517
|
-
|
|
48518
|
-
const commentText = getTextOfJSDocComment(
|
|
48538
|
+
const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */);
|
|
48539
|
+
if (jsdocPropertyTag) {
|
|
48540
|
+
const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
|
|
48519
48541
|
if (commentText) {
|
|
48520
48542
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
48521
48543
|
}
|
|
@@ -50822,7 +50844,15 @@ function createTypeChecker(host) {
|
|
|
50822
50844
|
const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
|
|
50823
50845
|
return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
|
|
50824
50846
|
!!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
|
|
50825
|
-
!getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) =>
|
|
50847
|
+
!getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
|
|
50848
|
+
if (!isIdentifierText(symbolName(p), languageVersion)) {
|
|
50849
|
+
return false;
|
|
50850
|
+
}
|
|
50851
|
+
if (!(p.flags & 98304 /* Accessor */)) {
|
|
50852
|
+
return true;
|
|
50853
|
+
}
|
|
50854
|
+
return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);
|
|
50855
|
+
});
|
|
50826
50856
|
}
|
|
50827
50857
|
function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
|
|
50828
50858
|
return function serializePropertySymbol(p, isStatic2, baseType) {
|
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.20231006`;
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -50230,7 +50230,7 @@ function createTypeChecker(host) {
|
|
|
50230
50230
|
return resolved;
|
|
50231
50231
|
}
|
|
50232
50232
|
function isSyntacticDefault(node) {
|
|
50233
|
-
return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node);
|
|
50233
|
+
return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node);
|
|
50234
50234
|
}
|
|
50235
50235
|
function getUsageModeForExpression(usage) {
|
|
50236
50236
|
return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0;
|
|
@@ -53188,6 +53188,28 @@ function createTypeChecker(host) {
|
|
|
53188
53188
|
const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
|
|
53189
53189
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
53190
53190
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
|
53191
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
53192
|
+
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
53193
|
+
if (propertyType !== writeType) {
|
|
53194
|
+
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
53195
|
+
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
53196
|
+
typeElements.push(
|
|
53197
|
+
setCommentRange(
|
|
53198
|
+
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
53199
|
+
getterDeclaration
|
|
53200
|
+
)
|
|
53201
|
+
);
|
|
53202
|
+
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
53203
|
+
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
53204
|
+
typeElements.push(
|
|
53205
|
+
setCommentRange(
|
|
53206
|
+
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
53207
|
+
setterDeclaration
|
|
53208
|
+
)
|
|
53209
|
+
);
|
|
53210
|
+
return;
|
|
53211
|
+
}
|
|
53212
|
+
}
|
|
53191
53213
|
const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
|
|
53192
53214
|
if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
|
|
53193
53215
|
const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);
|
|
@@ -53225,9 +53247,9 @@ function createTypeChecker(host) {
|
|
|
53225
53247
|
typeElements.push(preserveCommentsOn(propertySignature));
|
|
53226
53248
|
function preserveCommentsOn(node) {
|
|
53227
53249
|
var _a2;
|
|
53228
|
-
|
|
53229
|
-
|
|
53230
|
-
const commentText = getTextOfJSDocComment(
|
|
53250
|
+
const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */);
|
|
53251
|
+
if (jsdocPropertyTag) {
|
|
53252
|
+
const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
|
|
53231
53253
|
if (commentText) {
|
|
53232
53254
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
53233
53255
|
}
|
|
@@ -55534,7 +55556,15 @@ function createTypeChecker(host) {
|
|
|
55534
55556
|
const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
|
|
55535
55557
|
return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
|
|
55536
55558
|
!!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
|
|
55537
|
-
!getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) =>
|
|
55559
|
+
!getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
|
|
55560
|
+
if (!isIdentifierText(symbolName(p), languageVersion)) {
|
|
55561
|
+
return false;
|
|
55562
|
+
}
|
|
55563
|
+
if (!(p.flags & 98304 /* Accessor */)) {
|
|
55564
|
+
return true;
|
|
55565
|
+
}
|
|
55566
|
+
return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);
|
|
55567
|
+
});
|
|
55538
55568
|
}
|
|
55539
55569
|
function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
|
|
55540
55570
|
return function serializePropertySymbol(p, isStatic2, baseType) {
|
|
@@ -157235,7 +157265,7 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
|
|
|
157235
157265
|
);
|
|
157236
157266
|
if (keywordFilters !== 0 /* None */) {
|
|
157237
157267
|
for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) {
|
|
157238
|
-
if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !uniqueNames.has(keywordEntry.name)) {
|
|
157268
|
+
if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !isTypeOnlyLocation && isContextualKeywordInAutoImportableExpressionSpace(keywordEntry.name) || !uniqueNames.has(keywordEntry.name)) {
|
|
157239
157269
|
uniqueNames.add(keywordEntry.name);
|
|
157240
157270
|
insertSorted(
|
|
157241
157271
|
entries,
|
|
@@ -160424,6 +160454,9 @@ function toUpperCharCode(charCode) {
|
|
|
160424
160454
|
}
|
|
160425
160455
|
return charCode;
|
|
160426
160456
|
}
|
|
160457
|
+
function isContextualKeywordInAutoImportableExpressionSpace(keyword) {
|
|
160458
|
+
return keyword === "abstract" || keyword === "async" || keyword === "await" || keyword === "declare" || keyword === "module" || keyword === "namespace" || keyword === "type";
|
|
160459
|
+
}
|
|
160427
160460
|
|
|
160428
160461
|
// src/services/_namespaces/ts.Completions.StringCompletions.ts
|
|
160429
160462
|
var ts_Completions_StringCompletions_exports = {};
|
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.20231006`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -47997,7 +47997,7 @@ ${lanes.join("\n")}
|
|
|
47997
47997
|
return resolved;
|
|
47998
47998
|
}
|
|
47999
47999
|
function isSyntacticDefault(node) {
|
|
48000
|
-
return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node);
|
|
48000
|
+
return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node);
|
|
48001
48001
|
}
|
|
48002
48002
|
function getUsageModeForExpression(usage) {
|
|
48003
48003
|
return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0;
|
|
@@ -50955,6 +50955,28 @@ ${lanes.join("\n")}
|
|
|
50955
50955
|
const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
|
|
50956
50956
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
50957
50957
|
context.approximateLength += symbolName(propertySymbol).length + 1;
|
|
50958
|
+
if (propertySymbol.flags & 98304 /* Accessor */) {
|
|
50959
|
+
const writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
50960
|
+
if (propertyType !== writeType) {
|
|
50961
|
+
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
50962
|
+
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
50963
|
+
typeElements.push(
|
|
50964
|
+
setCommentRange(
|
|
50965
|
+
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
50966
|
+
getterDeclaration
|
|
50967
|
+
)
|
|
50968
|
+
);
|
|
50969
|
+
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
50970
|
+
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
50971
|
+
typeElements.push(
|
|
50972
|
+
setCommentRange(
|
|
50973
|
+
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
50974
|
+
setterDeclaration
|
|
50975
|
+
)
|
|
50976
|
+
);
|
|
50977
|
+
return;
|
|
50978
|
+
}
|
|
50979
|
+
}
|
|
50958
50980
|
const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
|
|
50959
50981
|
if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
|
|
50960
50982
|
const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);
|
|
@@ -50992,9 +51014,9 @@ ${lanes.join("\n")}
|
|
|
50992
51014
|
typeElements.push(preserveCommentsOn(propertySignature));
|
|
50993
51015
|
function preserveCommentsOn(node) {
|
|
50994
51016
|
var _a2;
|
|
50995
|
-
|
|
50996
|
-
|
|
50997
|
-
const commentText = getTextOfJSDocComment(
|
|
51017
|
+
const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */);
|
|
51018
|
+
if (jsdocPropertyTag) {
|
|
51019
|
+
const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
|
|
50998
51020
|
if (commentText) {
|
|
50999
51021
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
51000
51022
|
}
|
|
@@ -53301,7 +53323,15 @@ ${lanes.join("\n")}
|
|
|
53301
53323
|
const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
|
|
53302
53324
|
return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
|
|
53303
53325
|
!!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
|
|
53304
|
-
!getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) =>
|
|
53326
|
+
!getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
|
|
53327
|
+
if (!isIdentifierText(symbolName(p), languageVersion)) {
|
|
53328
|
+
return false;
|
|
53329
|
+
}
|
|
53330
|
+
if (!(p.flags & 98304 /* Accessor */)) {
|
|
53331
|
+
return true;
|
|
53332
|
+
}
|
|
53333
|
+
return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);
|
|
53334
|
+
});
|
|
53305
53335
|
}
|
|
53306
53336
|
function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
|
|
53307
53337
|
return function serializePropertySymbol(p, isStatic2, baseType) {
|
|
@@ -156459,7 +156489,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156459
156489
|
);
|
|
156460
156490
|
if (keywordFilters !== 0 /* None */) {
|
|
156461
156491
|
for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) {
|
|
156462
|
-
if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !uniqueNames.has(keywordEntry.name)) {
|
|
156492
|
+
if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !isTypeOnlyLocation && isContextualKeywordInAutoImportableExpressionSpace(keywordEntry.name) || !uniqueNames.has(keywordEntry.name)) {
|
|
156463
156493
|
uniqueNames.add(keywordEntry.name);
|
|
156464
156494
|
insertSorted(
|
|
156465
156495
|
entries,
|
|
@@ -159626,6 +159656,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159626
159656
|
}
|
|
159627
159657
|
return charCode;
|
|
159628
159658
|
}
|
|
159659
|
+
function isContextualKeywordInAutoImportableExpressionSpace(keyword) {
|
|
159660
|
+
return keyword === "abstract" || keyword === "async" || keyword === "await" || keyword === "declare" || keyword === "module" || keyword === "namespace" || keyword === "type";
|
|
159661
|
+
}
|
|
159629
159662
|
var moduleSpecifierResolutionLimit, moduleSpecifierResolutionCacheAttemptLimit, SortText, CompletionSource, SymbolOriginInfoKind, CompletionKind, _keywordCompletions, allKeywordsCompletions;
|
|
159630
159663
|
var init_completions = __esm({
|
|
159631
159664
|
"src/services/completions.ts"() {
|
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.20231006`;
|
|
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.20231006",
|
|
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": "2e58032f067fbe0d6efbdc970b54b6d72c349aa8"
|
|
117
117
|
}
|