typescript 5.1.3 → 5.1.5
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 +6 -4
- package/lib/tsserver.js +12 -9
- package/lib/tsserverlibrary.d.ts +0 -1
- package/lib/tsserverlibrary.js +12 -9
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +12 -9
- package/lib/typingsInstaller.js +1 -1
- package/package.json +1 -1
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.1";
|
|
21
|
-
var version = "5.1.
|
|
21
|
+
var version = "5.1.5";
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -58055,7 +58055,10 @@ function createTypeChecker(host) {
|
|
|
58055
58055
|
const newMapper = createTypeMapper(typeParameters, typeArguments);
|
|
58056
58056
|
result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
|
|
58057
58057
|
if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
58058
|
-
|
|
58058
|
+
const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
|
|
58059
|
+
if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
58060
|
+
result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0);
|
|
58061
|
+
}
|
|
58059
58062
|
}
|
|
58060
58063
|
target.instantiations.set(id, result);
|
|
58061
58064
|
}
|
|
@@ -60581,7 +60584,6 @@ function createTypeChecker(host) {
|
|
|
60581
60584
|
} else if (targetFlags & 8388608 /* IndexedAccess */) {
|
|
60582
60585
|
if (sourceFlags & 8388608 /* IndexedAccess */) {
|
|
60583
60586
|
if (result2 = isRelatedTo(source2.objectType, target2.objectType, 3 /* Both */, reportErrors2)) {
|
|
60584
|
-
instantiateType(source2.objectType, reportUnreliableMapper);
|
|
60585
60587
|
result2 &= isRelatedTo(source2.indexType, target2.indexType, 3 /* Both */, reportErrors2);
|
|
60586
60588
|
}
|
|
60587
60589
|
if (result2) {
|
|
@@ -95306,7 +95308,7 @@ function transformJsx(context) {
|
|
|
95306
95308
|
continue;
|
|
95307
95309
|
}
|
|
95308
95310
|
finishObjectLiteralIfNeeded();
|
|
95309
|
-
expressions.push(attr.expression);
|
|
95311
|
+
expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression)));
|
|
95310
95312
|
continue;
|
|
95311
95313
|
}
|
|
95312
95314
|
properties.push(transformJsxAttributeToObjectLiteralElement(attr));
|
package/lib/tsserver.js
CHANGED
|
@@ -2304,7 +2304,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2304
2304
|
|
|
2305
2305
|
// src/compiler/corePublic.ts
|
|
2306
2306
|
var versionMajorMinor = "5.1";
|
|
2307
|
-
var version = "5.1.
|
|
2307
|
+
var version = "5.1.5";
|
|
2308
2308
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2309
2309
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2310
2310
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -62706,7 +62706,10 @@ function createTypeChecker(host) {
|
|
|
62706
62706
|
const newMapper = createTypeMapper(typeParameters, typeArguments);
|
|
62707
62707
|
result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
|
|
62708
62708
|
if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
62709
|
-
|
|
62709
|
+
const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
|
|
62710
|
+
if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
62711
|
+
result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0);
|
|
62712
|
+
}
|
|
62710
62713
|
}
|
|
62711
62714
|
target.instantiations.set(id, result);
|
|
62712
62715
|
}
|
|
@@ -65232,7 +65235,6 @@ function createTypeChecker(host) {
|
|
|
65232
65235
|
} else if (targetFlags & 8388608 /* IndexedAccess */) {
|
|
65233
65236
|
if (sourceFlags & 8388608 /* IndexedAccess */) {
|
|
65234
65237
|
if (result2 = isRelatedTo(source2.objectType, target2.objectType, 3 /* Both */, reportErrors2)) {
|
|
65235
|
-
instantiateType(source2.objectType, reportUnreliableMapper);
|
|
65236
65238
|
result2 &= isRelatedTo(source2.indexType, target2.indexType, 3 /* Both */, reportErrors2);
|
|
65237
65239
|
}
|
|
65238
65240
|
if (result2) {
|
|
@@ -100128,7 +100130,7 @@ function transformJsx(context) {
|
|
|
100128
100130
|
continue;
|
|
100129
100131
|
}
|
|
100130
100132
|
finishObjectLiteralIfNeeded();
|
|
100131
|
-
expressions.push(attr.expression);
|
|
100133
|
+
expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression)));
|
|
100132
100134
|
continue;
|
|
100133
100135
|
}
|
|
100134
100136
|
properties.push(transformJsxAttributeToObjectLiteralElement(attr));
|
|
@@ -156311,7 +156313,7 @@ function getSourceFromOrigin(origin) {
|
|
|
156311
156313
|
}
|
|
156312
156314
|
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {
|
|
156313
156315
|
const start2 = timestamp();
|
|
156314
|
-
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
|
|
156316
|
+
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
|
|
156315
156317
|
const useSemicolons = probablyUsesSemicolons(sourceFile);
|
|
156316
156318
|
const typeChecker = program.getTypeChecker();
|
|
156317
156319
|
const uniques = /* @__PURE__ */ new Map();
|
|
@@ -158490,11 +158492,12 @@ function isModuleSpecifierMissingOrEmpty(specifier) {
|
|
|
158490
158492
|
return true;
|
|
158491
158493
|
return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
|
|
158492
158494
|
}
|
|
158493
|
-
function getVariableOrParameterDeclaration(contextToken) {
|
|
158495
|
+
function getVariableOrParameterDeclaration(contextToken, location) {
|
|
158494
158496
|
if (!contextToken)
|
|
158495
158497
|
return;
|
|
158496
|
-
const
|
|
158497
|
-
|
|
158498
|
+
const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
|
|
158499
|
+
const possiblyVariableDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node));
|
|
158500
|
+
return possiblyParameterDeclaration || possiblyVariableDeclaration;
|
|
158498
158501
|
}
|
|
158499
158502
|
function isArrowFunctionBody(node) {
|
|
158500
158503
|
return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
|
|
@@ -158736,7 +158739,7 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck
|
|
|
158736
158739
|
case 290 /* JsxAttribute */:
|
|
158737
158740
|
if (!isRequireCallArgument(node) && !isImportCall(parent2)) {
|
|
158738
158741
|
const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 290 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile);
|
|
158739
|
-
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType();
|
|
158742
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */);
|
|
158740
158743
|
}
|
|
158741
158744
|
case 271 /* ImportDeclaration */:
|
|
158742
158745
|
case 277 /* ExportDeclaration */:
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -5446,7 +5446,6 @@ declare namespace ts {
|
|
|
5446
5446
|
type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
|
5447
5447
|
interface JsxSpreadAttribute extends ObjectLiteralElement {
|
|
5448
5448
|
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
|
5449
|
-
readonly name: PropertyName;
|
|
5450
5449
|
readonly parent: JsxAttributes;
|
|
5451
5450
|
readonly expression: Expression;
|
|
5452
5451
|
}
|
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.1";
|
|
38
|
-
version = "5.1.
|
|
38
|
+
version = "5.1.5";
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -60497,7 +60497,10 @@ ${lanes.join("\n")}
|
|
|
60497
60497
|
const newMapper = createTypeMapper(typeParameters, typeArguments);
|
|
60498
60498
|
result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
|
|
60499
60499
|
if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
60500
|
-
|
|
60500
|
+
const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
|
|
60501
|
+
if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
60502
|
+
result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0);
|
|
60503
|
+
}
|
|
60501
60504
|
}
|
|
60502
60505
|
target.instantiations.set(id, result);
|
|
60503
60506
|
}
|
|
@@ -63023,7 +63026,6 @@ ${lanes.join("\n")}
|
|
|
63023
63026
|
} else if (targetFlags & 8388608 /* IndexedAccess */) {
|
|
63024
63027
|
if (sourceFlags & 8388608 /* IndexedAccess */) {
|
|
63025
63028
|
if (result2 = isRelatedTo(source2.objectType, target2.objectType, 3 /* Both */, reportErrors2)) {
|
|
63026
|
-
instantiateType(source2.objectType, reportUnreliableMapper);
|
|
63027
63029
|
result2 &= isRelatedTo(source2.indexType, target2.indexType, 3 /* Both */, reportErrors2);
|
|
63028
63030
|
}
|
|
63029
63031
|
if (result2) {
|
|
@@ -98154,7 +98156,7 @@ ${lanes.join("\n")}
|
|
|
98154
98156
|
continue;
|
|
98155
98157
|
}
|
|
98156
98158
|
finishObjectLiteralIfNeeded();
|
|
98157
|
-
expressions.push(attr.expression);
|
|
98159
|
+
expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression)));
|
|
98158
98160
|
continue;
|
|
98159
98161
|
}
|
|
98160
98162
|
properties.push(transformJsxAttributeToObjectLiteralElement(attr));
|
|
@@ -155543,7 +155545,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155543
155545
|
}
|
|
155544
155546
|
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {
|
|
155545
155547
|
const start = timestamp();
|
|
155546
|
-
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
|
|
155548
|
+
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
|
|
155547
155549
|
const useSemicolons = probablyUsesSemicolons(sourceFile);
|
|
155548
155550
|
const typeChecker = program.getTypeChecker();
|
|
155549
155551
|
const uniques = /* @__PURE__ */ new Map();
|
|
@@ -157700,11 +157702,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
157700
157702
|
return true;
|
|
157701
157703
|
return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
|
|
157702
157704
|
}
|
|
157703
|
-
function getVariableOrParameterDeclaration(contextToken) {
|
|
157705
|
+
function getVariableOrParameterDeclaration(contextToken, location) {
|
|
157704
157706
|
if (!contextToken)
|
|
157705
157707
|
return;
|
|
157706
|
-
const
|
|
157707
|
-
|
|
157708
|
+
const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
|
|
157709
|
+
const possiblyVariableDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node));
|
|
157710
|
+
return possiblyParameterDeclaration || possiblyVariableDeclaration;
|
|
157708
157711
|
}
|
|
157709
157712
|
function isArrowFunctionBody(node) {
|
|
157710
157713
|
return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
|
|
@@ -158011,7 +158014,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158011
158014
|
case 290 /* JsxAttribute */:
|
|
158012
158015
|
if (!isRequireCallArgument(node) && !isImportCall(parent2)) {
|
|
158013
158016
|
const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 290 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile);
|
|
158014
|
-
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType();
|
|
158017
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */);
|
|
158015
158018
|
}
|
|
158016
158019
|
case 271 /* ImportDeclaration */:
|
|
158017
158020
|
case 277 /* ExportDeclaration */:
|
package/lib/typescript.d.ts
CHANGED
|
@@ -1398,7 +1398,6 @@ declare namespace ts {
|
|
|
1398
1398
|
type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
|
1399
1399
|
interface JsxSpreadAttribute extends ObjectLiteralElement {
|
|
1400
1400
|
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
|
1401
|
-
readonly name: PropertyName;
|
|
1402
1401
|
readonly parent: JsxAttributes;
|
|
1403
1402
|
readonly expression: Expression;
|
|
1404
1403
|
}
|
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.1";
|
|
38
|
-
version = "5.1.
|
|
38
|
+
version = "5.1.5";
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -60497,7 +60497,10 @@ ${lanes.join("\n")}
|
|
|
60497
60497
|
const newMapper = createTypeMapper(typeParameters, typeArguments);
|
|
60498
60498
|
result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
|
|
60499
60499
|
if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
60500
|
-
|
|
60500
|
+
const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
|
|
60501
|
+
if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
|
|
60502
|
+
result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0);
|
|
60503
|
+
}
|
|
60501
60504
|
}
|
|
60502
60505
|
target.instantiations.set(id, result);
|
|
60503
60506
|
}
|
|
@@ -63023,7 +63026,6 @@ ${lanes.join("\n")}
|
|
|
63023
63026
|
} else if (targetFlags & 8388608 /* IndexedAccess */) {
|
|
63024
63027
|
if (sourceFlags & 8388608 /* IndexedAccess */) {
|
|
63025
63028
|
if (result2 = isRelatedTo(source2.objectType, target2.objectType, 3 /* Both */, reportErrors2)) {
|
|
63026
|
-
instantiateType(source2.objectType, reportUnreliableMapper);
|
|
63027
63029
|
result2 &= isRelatedTo(source2.indexType, target2.indexType, 3 /* Both */, reportErrors2);
|
|
63028
63030
|
}
|
|
63029
63031
|
if (result2) {
|
|
@@ -98154,7 +98156,7 @@ ${lanes.join("\n")}
|
|
|
98154
98156
|
continue;
|
|
98155
98157
|
}
|
|
98156
98158
|
finishObjectLiteralIfNeeded();
|
|
98157
|
-
expressions.push(attr.expression);
|
|
98159
|
+
expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression)));
|
|
98158
98160
|
continue;
|
|
98159
98161
|
}
|
|
98160
98162
|
properties.push(transformJsxAttributeToObjectLiteralElement(attr));
|
|
@@ -155558,7 +155560,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155558
155560
|
}
|
|
155559
155561
|
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {
|
|
155560
155562
|
const start = timestamp();
|
|
155561
|
-
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
|
|
155563
|
+
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
|
|
155562
155564
|
const useSemicolons = probablyUsesSemicolons(sourceFile);
|
|
155563
155565
|
const typeChecker = program.getTypeChecker();
|
|
155564
155566
|
const uniques = /* @__PURE__ */ new Map();
|
|
@@ -157715,11 +157717,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
157715
157717
|
return true;
|
|
157716
157718
|
return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
|
|
157717
157719
|
}
|
|
157718
|
-
function getVariableOrParameterDeclaration(contextToken) {
|
|
157720
|
+
function getVariableOrParameterDeclaration(contextToken, location) {
|
|
157719
157721
|
if (!contextToken)
|
|
157720
157722
|
return;
|
|
157721
|
-
const
|
|
157722
|
-
|
|
157723
|
+
const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
|
|
157724
|
+
const possiblyVariableDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node));
|
|
157725
|
+
return possiblyParameterDeclaration || possiblyVariableDeclaration;
|
|
157723
157726
|
}
|
|
157724
157727
|
function isArrowFunctionBody(node) {
|
|
157725
157728
|
return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
|
|
@@ -158026,7 +158029,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158026
158029
|
case 290 /* JsxAttribute */:
|
|
158027
158030
|
if (!isRequireCallArgument(node) && !isImportCall(parent2)) {
|
|
158028
158031
|
const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 290 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile);
|
|
158029
|
-
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType();
|
|
158032
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */);
|
|
158030
158033
|
}
|
|
158031
158034
|
case 271 /* ImportDeclaration */:
|
|
158032
158035
|
case 277 /* ExportDeclaration */:
|
package/lib/typingsInstaller.js
CHANGED
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.1.
|
|
5
|
+
"version": "5.1.5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|