@typescript-deploys/pr-build 5.0.0-pr-52818-5 → 5.0.0-pr-52836-9
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 +109 -68
- package/lib/tsserver.js +133 -77
- package/lib/tsserverlibrary.js +133 -77
- package/lib/typescript.js +133 -77
- package/lib/typingsInstaller.js +39 -39
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.0";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230218`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9616,18 +9616,18 @@ ${lanes.join("\n")}
|
|
|
9616
9616
|
return true;
|
|
9617
9617
|
}
|
|
9618
9618
|
function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Standard */, textInitial, onError, start, length2) {
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9619
|
+
var text = textInitial;
|
|
9620
|
+
var pos;
|
|
9621
|
+
var end;
|
|
9622
|
+
var startPos;
|
|
9623
|
+
var tokenPos;
|
|
9624
|
+
var token;
|
|
9625
|
+
var tokenValue;
|
|
9626
|
+
var tokenFlags;
|
|
9627
|
+
var commentDirectives;
|
|
9628
|
+
var inJSDocType = 0;
|
|
9629
9629
|
setText(text, start, length2);
|
|
9630
|
-
|
|
9630
|
+
var scanner2 = {
|
|
9631
9631
|
getStartPos: () => startPos,
|
|
9632
9632
|
getTextPos: () => pos,
|
|
9633
9633
|
getToken: () => token,
|
|
@@ -28464,22 +28464,22 @@ ${lanes.join("\n")}
|
|
|
28464
28464
|
[356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression
|
|
28465
28465
|
};
|
|
28466
28466
|
((Parser2) => {
|
|
28467
|
-
|
|
28467
|
+
var scanner2 = createScanner(
|
|
28468
28468
|
99 /* Latest */,
|
|
28469
28469
|
/*skipTrivia*/
|
|
28470
28470
|
true
|
|
28471
28471
|
);
|
|
28472
|
-
|
|
28473
|
-
|
|
28474
|
-
|
|
28475
|
-
|
|
28476
|
-
|
|
28477
|
-
|
|
28472
|
+
var disallowInAndDecoratorContext = 4096 /* DisallowInContext */ | 16384 /* DecoratorContext */;
|
|
28473
|
+
var NodeConstructor2;
|
|
28474
|
+
var TokenConstructor2;
|
|
28475
|
+
var IdentifierConstructor2;
|
|
28476
|
+
var PrivateIdentifierConstructor2;
|
|
28477
|
+
var SourceFileConstructor2;
|
|
28478
28478
|
function countNode(node) {
|
|
28479
28479
|
nodeCount++;
|
|
28480
28480
|
return node;
|
|
28481
28481
|
}
|
|
28482
|
-
|
|
28482
|
+
var baseNodeFactory = {
|
|
28483
28483
|
createBaseSourceFileNode: (kind) => countNode(new SourceFileConstructor2(
|
|
28484
28484
|
kind,
|
|
28485
28485
|
/*pos*/
|
|
@@ -28516,25 +28516,25 @@ ${lanes.join("\n")}
|
|
|
28516
28516
|
0
|
|
28517
28517
|
))
|
|
28518
28518
|
};
|
|
28519
|
-
|
|
28520
|
-
|
|
28521
|
-
|
|
28522
|
-
|
|
28523
|
-
|
|
28524
|
-
|
|
28525
|
-
|
|
28526
|
-
|
|
28527
|
-
|
|
28528
|
-
|
|
28529
|
-
|
|
28530
|
-
|
|
28531
|
-
|
|
28532
|
-
|
|
28533
|
-
|
|
28534
|
-
|
|
28535
|
-
|
|
28536
|
-
|
|
28537
|
-
|
|
28519
|
+
var factory2 = createNodeFactory(1 /* NoParenthesizerRules */ | 2 /* NoNodeConverters */ | 8 /* NoOriginalNode */, baseNodeFactory);
|
|
28520
|
+
var fileName;
|
|
28521
|
+
var sourceFlags;
|
|
28522
|
+
var sourceText;
|
|
28523
|
+
var languageVersion;
|
|
28524
|
+
var scriptKind;
|
|
28525
|
+
var languageVariant;
|
|
28526
|
+
var parseDiagnostics;
|
|
28527
|
+
var jsDocDiagnostics;
|
|
28528
|
+
var syntaxCursor;
|
|
28529
|
+
var currentToken;
|
|
28530
|
+
var nodeCount;
|
|
28531
|
+
var identifiers;
|
|
28532
|
+
var identifierCount;
|
|
28533
|
+
var parsingContext;
|
|
28534
|
+
var notParenthesizedArrow;
|
|
28535
|
+
var contextFlags;
|
|
28536
|
+
var topLevel = true;
|
|
28537
|
+
var parseErrorBeforeNextFinishedNode = false;
|
|
28538
28538
|
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) {
|
|
28539
28539
|
var _a2;
|
|
28540
28540
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
@@ -49703,7 +49703,7 @@ ${lanes.join("\n")}
|
|
|
49703
49703
|
return result;
|
|
49704
49704
|
}
|
|
49705
49705
|
function createAnonymousTypeNode(type2) {
|
|
49706
|
-
var _a3;
|
|
49706
|
+
var _a3, _b2;
|
|
49707
49707
|
const typeId = type2.id;
|
|
49708
49708
|
const symbol = type2.symbol;
|
|
49709
49709
|
if (symbol) {
|
|
@@ -49729,6 +49729,20 @@ ${lanes.join("\n")}
|
|
|
49729
49729
|
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
49730
49730
|
}
|
|
49731
49731
|
} else {
|
|
49732
|
+
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
49733
|
+
if (isInstantiationExpressionType) {
|
|
49734
|
+
const instantiationExpressionType = type2;
|
|
49735
|
+
if (isTypeQueryNode(instantiationExpressionType.node)) {
|
|
49736
|
+
const typeNode = serializeExistingTypeNode(context, instantiationExpressionType.node);
|
|
49737
|
+
if (typeNode) {
|
|
49738
|
+
return typeNode;
|
|
49739
|
+
}
|
|
49740
|
+
}
|
|
49741
|
+
if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
49742
|
+
return createElidedInformationPlaceholder(context);
|
|
49743
|
+
}
|
|
49744
|
+
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
49745
|
+
}
|
|
49732
49746
|
return createTypeNodeFromObjectType(type2);
|
|
49733
49747
|
}
|
|
49734
49748
|
function shouldWriteTypeOfFunctionSymbol() {
|
|
@@ -50237,7 +50251,7 @@ ${lanes.join("\n")}
|
|
|
50237
50251
|
);
|
|
50238
50252
|
}
|
|
50239
50253
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
50240
|
-
var _a2, _b, _c, _d;
|
|
50254
|
+
var _a2, _b, _c, _d, _e;
|
|
50241
50255
|
const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
|
|
50242
50256
|
if (suppressAny)
|
|
50243
50257
|
context.flags &= ~256 /* SuppressAnyReturnType */;
|
|
@@ -50254,6 +50268,39 @@ ${lanes.join("\n")}
|
|
|
50254
50268
|
/*skipUnionExpanding*/
|
|
50255
50269
|
true
|
|
50256
50270
|
)[0];
|
|
50271
|
+
let cleanup;
|
|
50272
|
+
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && some(expandedParams)) {
|
|
50273
|
+
const existingFakeScope = getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration ? context.enclosingDeclaration : void 0;
|
|
50274
|
+
Debug.assertOptionalNode(existingFakeScope, isBlock);
|
|
50275
|
+
const locals = (_a2 = existingFakeScope == null ? void 0 : existingFakeScope.locals) != null ? _a2 : createSymbolTable();
|
|
50276
|
+
let newLocals;
|
|
50277
|
+
for (const param of expandedParams) {
|
|
50278
|
+
if (!locals.has(param.escapedName)) {
|
|
50279
|
+
newLocals = append(newLocals, param.escapedName);
|
|
50280
|
+
locals.set(param.escapedName, param);
|
|
50281
|
+
}
|
|
50282
|
+
}
|
|
50283
|
+
if (newLocals) {
|
|
50284
|
+
let removeNewLocals2 = function() {
|
|
50285
|
+
forEach(newLocals, (s) => locals.delete(s));
|
|
50286
|
+
};
|
|
50287
|
+
var removeNewLocals = removeNewLocals2;
|
|
50288
|
+
if (existingFakeScope) {
|
|
50289
|
+
cleanup = removeNewLocals2;
|
|
50290
|
+
} else {
|
|
50291
|
+
const fakeScope = parseNodeFactory.createBlock(emptyArray);
|
|
50292
|
+
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = true;
|
|
50293
|
+
fakeScope.locals = locals;
|
|
50294
|
+
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
50295
|
+
setParent(fakeScope, saveEnclosingDeclaration);
|
|
50296
|
+
context.enclosingDeclaration = fakeScope;
|
|
50297
|
+
cleanup = () => {
|
|
50298
|
+
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
50299
|
+
removeNewLocals2();
|
|
50300
|
+
};
|
|
50301
|
+
}
|
|
50302
|
+
}
|
|
50303
|
+
}
|
|
50257
50304
|
const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 173 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports));
|
|
50258
50305
|
const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context);
|
|
50259
50306
|
if (thisParameter) {
|
|
@@ -50279,11 +50326,11 @@ ${lanes.join("\n")}
|
|
|
50279
50326
|
const flags = modifiersToFlags(modifiers);
|
|
50280
50327
|
modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */);
|
|
50281
50328
|
}
|
|
50282
|
-
const node = kind === 176 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 177 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 170 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (
|
|
50329
|
+
const node = kind === 176 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 177 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 170 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 171 /* MethodDeclaration */ ? factory.createMethodDeclaration(
|
|
50283
50330
|
modifiers,
|
|
50284
50331
|
/*asteriskToken*/
|
|
50285
50332
|
void 0,
|
|
50286
|
-
(
|
|
50333
|
+
(_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""),
|
|
50287
50334
|
/*questionToken*/
|
|
50288
50335
|
void 0,
|
|
50289
50336
|
typeParameters,
|
|
@@ -50298,14 +50345,14 @@ ${lanes.join("\n")}
|
|
|
50298
50345
|
void 0
|
|
50299
50346
|
) : kind === 174 /* GetAccessor */ ? factory.createGetAccessorDeclaration(
|
|
50300
50347
|
modifiers,
|
|
50301
|
-
(
|
|
50348
|
+
(_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""),
|
|
50302
50349
|
parameters,
|
|
50303
50350
|
returnTypeNode,
|
|
50304
50351
|
/*body*/
|
|
50305
50352
|
void 0
|
|
50306
50353
|
) : kind === 175 /* SetAccessor */ ? factory.createSetAccessorDeclaration(
|
|
50307
50354
|
modifiers,
|
|
50308
|
-
(
|
|
50355
|
+
(_e = options == null ? void 0 : options.name) != null ? _e : factory.createIdentifier(""),
|
|
50309
50356
|
parameters,
|
|
50310
50357
|
/*body*/
|
|
50311
50358
|
void 0
|
|
@@ -50340,6 +50387,7 @@ ${lanes.join("\n")}
|
|
|
50340
50387
|
if (typeArguments) {
|
|
50341
50388
|
node.typeArguments = factory.createNodeArray(typeArguments);
|
|
50342
50389
|
}
|
|
50390
|
+
cleanup == null ? void 0 : cleanup();
|
|
50343
50391
|
return node;
|
|
50344
50392
|
}
|
|
50345
50393
|
function tryGetThisParameterDeclaration(signature, context) {
|
|
@@ -50954,9 +51002,12 @@ ${lanes.join("\n")}
|
|
|
50954
51002
|
function existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) {
|
|
50955
51003
|
return !(getObjectFlags(type) & 4 /* Reference */) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);
|
|
50956
51004
|
}
|
|
51005
|
+
function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) {
|
|
51006
|
+
return getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration ? enclosingDeclaration.parent : enclosingDeclaration;
|
|
51007
|
+
}
|
|
50957
51008
|
function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) {
|
|
50958
51009
|
if (!isErrorType(type) && enclosingDeclaration) {
|
|
50959
|
-
const declWithExistingAnnotation = getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration);
|
|
51010
|
+
const declWithExistingAnnotation = getDeclarationWithTypeAnnotation(symbol, getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration));
|
|
50960
51011
|
if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
|
50961
51012
|
const existing = getEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
|
50962
51013
|
if (typeNodeIsEquivalentToType(existing, declWithExistingAnnotation, type) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) {
|
|
@@ -50988,7 +51039,8 @@ ${lanes.join("\n")}
|
|
|
50988
51039
|
function serializeReturnTypeForSignature(context, type, signature, includePrivateSymbol, bundled) {
|
|
50989
51040
|
if (!isErrorType(type) && context.enclosingDeclaration) {
|
|
50990
51041
|
const annotation = signature.declaration && getEffectiveReturnTypeNode(signature.declaration);
|
|
50991
|
-
|
|
51042
|
+
const enclosingDeclarationIgnoringFakeScope = getEnclosingDeclarationIgnoringFakeScope(context.enclosingDeclaration);
|
|
51043
|
+
if (!!findAncestor(annotation, (n) => n === enclosingDeclarationIgnoringFakeScope) && annotation) {
|
|
50992
51044
|
const annotated = getTypeFromTypeNode(annotation);
|
|
50993
51045
|
const thisInstantiated = annotated.flags & 262144 /* TypeParameter */ && annotated.isThisType ? instantiateType(annotated, signature.mapper) : annotated;
|
|
50994
51046
|
if (thisInstantiated === type && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(annotation, type)) {
|
|
@@ -58750,31 +58802,21 @@ ${lanes.join("\n")}
|
|
|
58750
58802
|
}
|
|
58751
58803
|
return type;
|
|
58752
58804
|
function addSpans(texts2, types2) {
|
|
58753
|
-
const isTextsArray = isArray(texts2);
|
|
58754
58805
|
for (let i = 0; i < types2.length; i++) {
|
|
58755
58806
|
const t = types2[i];
|
|
58756
|
-
const addText = isTextsArray ? texts2[i + 1] : texts2;
|
|
58757
58807
|
if (t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) {
|
|
58758
58808
|
text += getTemplateStringForType(t) || "";
|
|
58759
|
-
text +=
|
|
58760
|
-
if (!isTextsArray)
|
|
58761
|
-
return true;
|
|
58809
|
+
text += texts2[i + 1];
|
|
58762
58810
|
} else if (t.flags & 134217728 /* TemplateLiteral */) {
|
|
58763
58811
|
text += t.texts[0];
|
|
58764
58812
|
if (!addSpans(t.texts, t.types))
|
|
58765
58813
|
return false;
|
|
58766
|
-
text +=
|
|
58767
|
-
|
|
58768
|
-
return true;
|
|
58769
|
-
} else if (isGenericIndexType(t) || isPatternLiteralPlaceholderType(t)) {
|
|
58814
|
+
text += texts2[i + 1];
|
|
58815
|
+
} else if (isGenericIndexType(t) || isPatternLiteralPlaceholderType(t) || t.flags & 2097152 /* Intersection */) {
|
|
58770
58816
|
newTypes.push(t);
|
|
58771
58817
|
newTexts.push(text);
|
|
58772
|
-
text =
|
|
58773
|
-
} else
|
|
58774
|
-
const added = addSpans(texts2[i + 1], t.types);
|
|
58775
|
-
if (!added)
|
|
58776
|
-
return false;
|
|
58777
|
-
} else if (isTextsArray) {
|
|
58818
|
+
text = texts2[i + 1];
|
|
58819
|
+
} else {
|
|
58778
58820
|
return false;
|
|
58779
58821
|
}
|
|
58780
58822
|
}
|
|
@@ -80233,20 +80275,19 @@ ${lanes.join("\n")}
|
|
|
80233
80275
|
}
|
|
80234
80276
|
}
|
|
80235
80277
|
}
|
|
80236
|
-
function getMemberOverrideModifierStatus(node, member) {
|
|
80278
|
+
function getMemberOverrideModifierStatus(node, member, memberSymbol) {
|
|
80237
80279
|
if (!member.name) {
|
|
80238
80280
|
return 0 /* Ok */;
|
|
80239
80281
|
}
|
|
80240
|
-
const
|
|
80241
|
-
const type = getDeclaredTypeOfSymbol(
|
|
80282
|
+
const classSymbol = getSymbolOfDeclaration(node);
|
|
80283
|
+
const type = getDeclaredTypeOfSymbol(classSymbol);
|
|
80242
80284
|
const typeWithThis = getTypeWithThisArgument(type);
|
|
80243
|
-
const staticType = getTypeOfSymbol(
|
|
80285
|
+
const staticType = getTypeOfSymbol(classSymbol);
|
|
80244
80286
|
const baseTypeNode = getEffectiveBaseTypeNode(node);
|
|
80245
80287
|
const baseTypes = baseTypeNode && getBaseTypes(type);
|
|
80246
80288
|
const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0;
|
|
80247
80289
|
const baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
80248
80290
|
const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16384 /* Override */);
|
|
80249
|
-
const memberName = unescapeLeadingUnderscores(getTextOfPropertyName(member.name));
|
|
80250
80291
|
return checkMemberForOverrideModifier(
|
|
80251
80292
|
node,
|
|
80252
80293
|
staticType,
|
|
@@ -80259,7 +80300,7 @@ ${lanes.join("\n")}
|
|
|
80259
80300
|
isStatic(member),
|
|
80260
80301
|
/* memberIsParameterProperty */
|
|
80261
80302
|
false,
|
|
80262
|
-
|
|
80303
|
+
symbolName(memberSymbol)
|
|
80263
80304
|
);
|
|
80264
80305
|
}
|
|
80265
80306
|
function getTargetSymbol(s) {
|
|
@@ -147309,7 +147350,7 @@ ${lanes.join("\n")}
|
|
|
147309
147350
|
return !!(origin && origin.kind === 32 /* ResolvedExport */);
|
|
147310
147351
|
}
|
|
147311
147352
|
function originIncludesSymbolName(origin) {
|
|
147312
|
-
return originIsExport(origin) || originIsResolvedExport(origin);
|
|
147353
|
+
return originIsExport(origin) || originIsResolvedExport(origin) || originIsComputedPropertyName(origin);
|
|
147313
147354
|
}
|
|
147314
147355
|
function originIsPackageJsonImport(origin) {
|
|
147315
147356
|
return (originIsExport(origin) || originIsResolvedExport(origin)) && !!origin.isFromPackageJson;
|
|
@@ -147329,6 +147370,9 @@ ${lanes.join("\n")}
|
|
|
147329
147370
|
function originIsIgnore(origin) {
|
|
147330
147371
|
return !!(origin && origin.kind & 256 /* Ignore */);
|
|
147331
147372
|
}
|
|
147373
|
+
function originIsComputedPropertyName(origin) {
|
|
147374
|
+
return !!(origin && origin.kind & 512 /* ComputedPropertyName */);
|
|
147375
|
+
}
|
|
147332
147376
|
function resolvingModuleSpecifiers(logPrefix, host, resolver, program, position, preferences, isForImportStatementCompletion, isValidTypeOnlyUseSite, cb) {
|
|
147333
147377
|
var _a2, _b, _c;
|
|
147334
147378
|
const start = timestamp();
|
|
@@ -148055,7 +148099,7 @@ ${lanes.join("\n")}
|
|
|
148055
148099
|
if (isAbstract) {
|
|
148056
148100
|
requiredModifiers |= 256 /* Abstract */;
|
|
148057
148101
|
}
|
|
148058
|
-
if (isClassElement(node) && checker.getMemberOverrideModifierStatus(classLikeDeclaration, node) === 1 /* NeedsOverride */) {
|
|
148102
|
+
if (isClassElement(node) && checker.getMemberOverrideModifierStatus(classLikeDeclaration, node, symbol) === 1 /* NeedsOverride */) {
|
|
148059
148103
|
requiredModifiers |= 16384 /* Override */;
|
|
148060
148104
|
}
|
|
148061
148105
|
if (!completionNodes.length) {
|
|
@@ -148649,7 +148693,8 @@ ${lanes.join("\n")}
|
|
|
148649
148693
|
case "symbol": {
|
|
148650
148694
|
const { symbol, location, contextToken: contextToken2, origin, previousToken: previousToken2 } = symbolCompletion;
|
|
148651
148695
|
const { codeActions, sourceDisplay } = getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken2, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken2, formatContext, preferences, data, source, cancellationToken);
|
|
148652
|
-
|
|
148696
|
+
const symbolName2 = originIsComputedPropertyName(origin) ? origin.symbolName : symbol.name;
|
|
148697
|
+
return createCompletionDetailsForSymbol(symbol, symbolName2, typeChecker, sourceFile, location, cancellationToken, codeActions, sourceDisplay);
|
|
148653
148698
|
}
|
|
148654
148699
|
case "literal": {
|
|
148655
148700
|
const { literal } = symbolCompletion;
|
|
@@ -148700,12 +148745,12 @@ ${lanes.join("\n")}
|
|
|
148700
148745
|
function createSimpleDetails(name, kind, kind2) {
|
|
148701
148746
|
return createCompletionDetails(name, "" /* none */, kind, [displayPart(name, kind2)]);
|
|
148702
148747
|
}
|
|
148703
|
-
function createCompletionDetailsForSymbol(symbol, checker, sourceFile, location, cancellationToken, codeActions, sourceDisplay) {
|
|
148748
|
+
function createCompletionDetailsForSymbol(symbol, name, checker, sourceFile, location, cancellationToken, codeActions, sourceDisplay) {
|
|
148704
148749
|
const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken(
|
|
148705
148750
|
cancellationToken,
|
|
148706
148751
|
(checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */)
|
|
148707
148752
|
);
|
|
148708
|
-
return createCompletionDetails(
|
|
148753
|
+
return createCompletionDetails(name, ts_SymbolDisplay_exports.getSymbolModifiers(checker, symbol), symbolKind, displayParts, documentation, tags, codeActions, sourceDisplay);
|
|
148709
148754
|
}
|
|
148710
148755
|
function createCompletionDetails(name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source) {
|
|
148711
148756
|
return { name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source, sourceDisplay: source };
|
|
@@ -149803,6 +149848,16 @@ ${lanes.join("\n")}
|
|
|
149803
149848
|
return classElementModifierFlags & 32 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type);
|
|
149804
149849
|
});
|
|
149805
149850
|
symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
|
|
149851
|
+
forEach(symbols, (symbol, index) => {
|
|
149852
|
+
const declaration = symbol == null ? void 0 : symbol.valueDeclaration;
|
|
149853
|
+
if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {
|
|
149854
|
+
const origin = {
|
|
149855
|
+
kind: 512 /* ComputedPropertyName */,
|
|
149856
|
+
symbolName: typeChecker.symbolToString(symbol)
|
|
149857
|
+
};
|
|
149858
|
+
symbolToOriginInfoMap[index] = origin;
|
|
149859
|
+
}
|
|
149860
|
+
});
|
|
149806
149861
|
}
|
|
149807
149862
|
return 1 /* Success */;
|
|
149808
149863
|
}
|
|
@@ -150187,7 +150242,7 @@ ${lanes.join("\n")}
|
|
|
150187
150242
|
}
|
|
150188
150243
|
switch (kind) {
|
|
150189
150244
|
case 3 /* MemberLike */:
|
|
150190
|
-
return void 0;
|
|
150245
|
+
return originIsComputedPropertyName(origin) ? { name: origin.symbolName, needsConvertPropertyAccess: false } : void 0;
|
|
150191
150246
|
case 0 /* ObjectPropertyDeclaration */:
|
|
150192
150247
|
return { name: JSON.stringify(name), needsConvertPropertyAccess: false };
|
|
150193
150248
|
case 2 /* PropertyAccess */:
|
|
@@ -150695,6 +150750,7 @@ ${lanes.join("\n")}
|
|
|
150695
150750
|
SymbolOriginInfoKind2[SymbolOriginInfoKind2["TypeOnlyAlias"] = 64] = "TypeOnlyAlias";
|
|
150696
150751
|
SymbolOriginInfoKind2[SymbolOriginInfoKind2["ObjectLiteralMethod"] = 128] = "ObjectLiteralMethod";
|
|
150697
150752
|
SymbolOriginInfoKind2[SymbolOriginInfoKind2["Ignore"] = 256] = "Ignore";
|
|
150753
|
+
SymbolOriginInfoKind2[SymbolOriginInfoKind2["ComputedPropertyName"] = 512] = "ComputedPropertyName";
|
|
150698
150754
|
SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMemberNoExport"] = 2 /* SymbolMember */] = "SymbolMemberNoExport";
|
|
150699
150755
|
SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMemberExport"] = 6] = "SymbolMemberExport";
|
|
150700
150756
|
return SymbolOriginInfoKind2;
|
|
@@ -150830,7 +150886,7 @@ ${lanes.join("\n")}
|
|
|
150830
150886
|
}
|
|
150831
150887
|
case 1 /* Properties */: {
|
|
150832
150888
|
const match = find(completion.symbols, (s) => s.name === name);
|
|
150833
|
-
return match && createCompletionDetailsForSymbol(match, checker, sourceFile, location, cancellationToken);
|
|
150889
|
+
return match && createCompletionDetailsForSymbol(match, match.name, checker, sourceFile, location, cancellationToken);
|
|
150834
150890
|
}
|
|
150835
150891
|
case 2 /* Types */:
|
|
150836
150892
|
return find(completion.types, (t) => t.value === name) ? createCompletionDetails(name, "" /* none */, "string" /* string */, [textPart(name)]) : void 0;
|
|
@@ -165943,7 +165999,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
165943
165999
|
}
|
|
165944
166000
|
function processChildNode(child, inheritedIndentation, parent2, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
|
|
165945
166001
|
Debug.assert(!nodeIsSynthesized(child));
|
|
165946
|
-
if (nodeIsMissing(child)) {
|
|
166002
|
+
if (nodeIsMissing(child) || isGrammarError(parent2, child)) {
|
|
165947
166003
|
return inheritedIndentation;
|
|
165948
166004
|
}
|
|
165949
166005
|
const childStartPos = child.getStart(sourceFile);
|
|
@@ -165986,7 +166042,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
165986
166042
|
}
|
|
165987
166043
|
if (isToken(child)) {
|
|
165988
166044
|
const tokenInfo = formattingScanner.readTokenInfo(child);
|
|
165989
|
-
if (child.kind !== 11 /* JsxText */
|
|
166045
|
+
if (child.kind !== 11 /* JsxText */) {
|
|
165990
166046
|
Debug.assert(tokenInfo.token.end === child.end, "Token end is child end");
|
|
165991
166047
|
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child);
|
|
165992
166048
|
return inheritedIndentation;
|