@typescript-deploys/pr-build 5.2.0-pr-54688-11 → 5.2.0-pr-54656-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/lib.dom.d.ts +313 -90
- package/lib/lib.webworker.d.ts +172 -33
- package/lib/tsc.js +24 -27
- package/lib/tsserver.js +31 -31
- package/lib/tsserverlibrary.d.ts +0 -1
- package/lib/tsserverlibrary.js +31 -31
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +31 -31
- package/lib/typingsInstaller.js +3 -6
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -2305,7 +2305,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2305
2305
|
|
|
2306
2306
|
// src/compiler/corePublic.ts
|
|
2307
2307
|
var versionMajorMinor = "5.2";
|
|
2308
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2308
|
+
var version = `${versionMajorMinor}.0-insiders.20230622`;
|
|
2309
2309
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2310
2310
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2311
2311
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -8443,7 +8443,7 @@ var sys = (() => {
|
|
|
8443
8443
|
disableCPUProfiler,
|
|
8444
8444
|
cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
|
|
8445
8445
|
realpath,
|
|
8446
|
-
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
|
|
8446
|
+
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
|
|
8447
8447
|
tryEnableSourceMapsForHost() {
|
|
8448
8448
|
try {
|
|
8449
8449
|
require("source-map-support").install();
|
|
@@ -33210,7 +33210,7 @@ var Parser;
|
|
|
33210
33210
|
}
|
|
33211
33211
|
const pos = getNodePos();
|
|
33212
33212
|
const type = parseUnionTypeOrHigher();
|
|
33213
|
-
if (!inDisallowConditionalTypesContext() &&
|
|
33213
|
+
if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(96 /* ExtendsKeyword */)) {
|
|
33214
33214
|
const extendsType = disallowConditionalTypesAnd(parseType);
|
|
33215
33215
|
parseExpected(58 /* QuestionToken */);
|
|
33216
33216
|
const trueType = allowConditionalTypesAnd(parseType);
|
|
@@ -33220,9 +33220,6 @@ var Parser;
|
|
|
33220
33220
|
}
|
|
33221
33221
|
return type;
|
|
33222
33222
|
}
|
|
33223
|
-
function parseConditionalTypeExtends() {
|
|
33224
|
-
return parseOptional(96 /* ExtendsKeyword */) && !(parseOptional(58 /* QuestionToken */) || parseOptional(59 /* ColonToken */));
|
|
33225
|
-
}
|
|
33226
33223
|
function parseTypeAnnotation() {
|
|
33227
33224
|
return parseOptional(59 /* ColonToken */) ? parseType() : void 0;
|
|
33228
33225
|
}
|
|
@@ -47823,14 +47820,19 @@ function createTypeChecker(host) {
|
|
|
47823
47820
|
typeHasCallOrConstructSignatures
|
|
47824
47821
|
};
|
|
47825
47822
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
47826
|
-
const
|
|
47827
|
-
|
|
47828
|
-
|
|
47829
|
-
|
|
47823
|
+
const cachedSignatures = [];
|
|
47824
|
+
while (node) {
|
|
47825
|
+
if (isCallLikeExpression(node)) {
|
|
47826
|
+
const nodeLinks2 = getNodeLinks(node);
|
|
47827
|
+
const resolvedSignature = nodeLinks2.resolvedSignature;
|
|
47828
|
+
cachedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
47829
|
+
nodeLinks2.resolvedSignature = void 0;
|
|
47830
|
+
}
|
|
47831
|
+
node = node.parent;
|
|
47830
47832
|
}
|
|
47831
47833
|
const result = fn();
|
|
47832
|
-
|
|
47833
|
-
|
|
47834
|
+
for (const [nodeLinks2, resolvedSignature] of cachedSignatures) {
|
|
47835
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
47834
47836
|
}
|
|
47835
47837
|
return result;
|
|
47836
47838
|
}
|
|
@@ -55450,15 +55452,20 @@ function createTypeChecker(host) {
|
|
|
55450
55452
|
const prop = getPropertyOfType(type, name);
|
|
55451
55453
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
55452
55454
|
}
|
|
55453
|
-
function getTypeOfPropertyOrIndexSignature(type, name
|
|
55455
|
+
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
55456
|
+
var _a;
|
|
55457
|
+
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
55458
|
+
}
|
|
55459
|
+
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
55454
55460
|
var _a;
|
|
55455
55461
|
let propType;
|
|
55456
55462
|
return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality(
|
|
55457
55463
|
propType,
|
|
55458
55464
|
/*isProperty*/
|
|
55459
55465
|
true,
|
|
55460
|
-
|
|
55461
|
-
|
|
55466
|
+
/*isOptional*/
|
|
55467
|
+
true
|
|
55468
|
+
);
|
|
55462
55469
|
}
|
|
55463
55470
|
function isTypeAny(type) {
|
|
55464
55471
|
return type && (type.flags & 1 /* Any */) !== 0;
|
|
@@ -66460,12 +66467,7 @@ function createTypeChecker(host) {
|
|
|
66460
66467
|
let matched = false;
|
|
66461
66468
|
for (let i = 0; i < types.length; i++) {
|
|
66462
66469
|
if (include[i]) {
|
|
66463
|
-
const targetType =
|
|
66464
|
-
types[i],
|
|
66465
|
-
propertyName,
|
|
66466
|
-
/*addOptionalityToIndex*/
|
|
66467
|
-
true
|
|
66468
|
-
);
|
|
66470
|
+
const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName);
|
|
66469
66471
|
if (targetType && related(getDiscriminatingType(), targetType)) {
|
|
66470
66472
|
matched = true;
|
|
66471
66473
|
} else {
|
|
@@ -69863,12 +69865,7 @@ function createTypeChecker(host) {
|
|
|
69863
69865
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
69864
69866
|
const narrowedPropType = narrowType2(propType);
|
|
69865
69867
|
return filterType(type, (t) => {
|
|
69866
|
-
const discriminantType = getTypeOfPropertyOrIndexSignature(
|
|
69867
|
-
t,
|
|
69868
|
-
propName,
|
|
69869
|
-
/*addOptionalityToIndex*/
|
|
69870
|
-
false
|
|
69871
|
-
);
|
|
69868
|
+
const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName);
|
|
69872
69869
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
69873
69870
|
});
|
|
69874
69871
|
}
|
|
@@ -156713,7 +156710,7 @@ function getSourceFromOrigin(origin) {
|
|
|
156713
156710
|
}
|
|
156714
156711
|
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) {
|
|
156715
156712
|
const start2 = timestamp();
|
|
156716
|
-
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
|
|
156713
|
+
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
|
|
156717
156714
|
const useSemicolons = probablyUsesSemicolons(sourceFile);
|
|
156718
156715
|
const typeChecker = program.getTypeChecker();
|
|
156719
156716
|
const uniques = /* @__PURE__ */ new Map();
|
|
@@ -158899,11 +158896,14 @@ function isModuleSpecifierMissingOrEmpty(specifier) {
|
|
|
158899
158896
|
return true;
|
|
158900
158897
|
return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
|
|
158901
158898
|
}
|
|
158902
|
-
function getVariableOrParameterDeclaration(contextToken) {
|
|
158899
|
+
function getVariableOrParameterDeclaration(contextToken, location) {
|
|
158903
158900
|
if (!contextToken)
|
|
158904
158901
|
return;
|
|
158905
|
-
const
|
|
158906
|
-
|
|
158902
|
+
const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
|
|
158903
|
+
const possiblyVariableDeclaration = findAncestor(location, (node) => {
|
|
158904
|
+
return isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node);
|
|
158905
|
+
});
|
|
158906
|
+
return possiblyParameterDeclaration || possiblyVariableDeclaration;
|
|
158907
158907
|
}
|
|
158908
158908
|
function isArrowFunctionBody(node) {
|
|
158909
158909
|
return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -5451,7 +5451,6 @@ declare namespace ts {
|
|
|
5451
5451
|
type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
|
5452
5452
|
interface JsxSpreadAttribute extends ObjectLiteralElement {
|
|
5453
5453
|
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
|
5454
|
-
readonly name: PropertyName;
|
|
5455
5454
|
readonly parent: JsxAttributes;
|
|
5456
5455
|
readonly expression: Expression;
|
|
5457
5456
|
}
|
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.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230622`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6237,7 +6237,7 @@ ${lanes.join("\n")}
|
|
|
6237
6237
|
disableCPUProfiler,
|
|
6238
6238
|
cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
|
|
6239
6239
|
realpath,
|
|
6240
|
-
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
|
|
6240
|
+
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
|
|
6241
6241
|
tryEnableSourceMapsForHost() {
|
|
6242
6242
|
try {
|
|
6243
6243
|
require("source-map-support").install();
|
|
@@ -31305,7 +31305,7 @@ ${lanes.join("\n")}
|
|
|
31305
31305
|
}
|
|
31306
31306
|
const pos = getNodePos();
|
|
31307
31307
|
const type = parseUnionTypeOrHigher();
|
|
31308
|
-
if (!inDisallowConditionalTypesContext() &&
|
|
31308
|
+
if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(96 /* ExtendsKeyword */)) {
|
|
31309
31309
|
const extendsType = disallowConditionalTypesAnd(parseType);
|
|
31310
31310
|
parseExpected(58 /* QuestionToken */);
|
|
31311
31311
|
const trueType = allowConditionalTypesAnd(parseType);
|
|
@@ -31315,9 +31315,6 @@ ${lanes.join("\n")}
|
|
|
31315
31315
|
}
|
|
31316
31316
|
return type;
|
|
31317
31317
|
}
|
|
31318
|
-
function parseConditionalTypeExtends() {
|
|
31319
|
-
return parseOptional(96 /* ExtendsKeyword */) && !(parseOptional(58 /* QuestionToken */) || parseOptional(59 /* ColonToken */));
|
|
31320
|
-
}
|
|
31321
31318
|
function parseTypeAnnotation() {
|
|
31322
31319
|
return parseOptional(59 /* ColonToken */) ? parseType() : void 0;
|
|
31323
31320
|
}
|
|
@@ -45612,14 +45609,19 @@ ${lanes.join("\n")}
|
|
|
45612
45609
|
typeHasCallOrConstructSignatures
|
|
45613
45610
|
};
|
|
45614
45611
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
45615
|
-
const
|
|
45616
|
-
|
|
45617
|
-
|
|
45618
|
-
|
|
45612
|
+
const cachedSignatures = [];
|
|
45613
|
+
while (node) {
|
|
45614
|
+
if (isCallLikeExpression(node)) {
|
|
45615
|
+
const nodeLinks2 = getNodeLinks(node);
|
|
45616
|
+
const resolvedSignature = nodeLinks2.resolvedSignature;
|
|
45617
|
+
cachedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
45618
|
+
nodeLinks2.resolvedSignature = void 0;
|
|
45619
|
+
}
|
|
45620
|
+
node = node.parent;
|
|
45619
45621
|
}
|
|
45620
45622
|
const result = fn();
|
|
45621
|
-
|
|
45622
|
-
|
|
45623
|
+
for (const [nodeLinks2, resolvedSignature] of cachedSignatures) {
|
|
45624
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
45623
45625
|
}
|
|
45624
45626
|
return result;
|
|
45625
45627
|
}
|
|
@@ -53239,15 +53241,20 @@ ${lanes.join("\n")}
|
|
|
53239
53241
|
const prop = getPropertyOfType(type, name);
|
|
53240
53242
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
53241
53243
|
}
|
|
53242
|
-
function getTypeOfPropertyOrIndexSignature(type, name
|
|
53244
|
+
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
53245
|
+
var _a;
|
|
53246
|
+
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
53247
|
+
}
|
|
53248
|
+
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
53243
53249
|
var _a;
|
|
53244
53250
|
let propType;
|
|
53245
53251
|
return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality(
|
|
53246
53252
|
propType,
|
|
53247
53253
|
/*isProperty*/
|
|
53248
53254
|
true,
|
|
53249
|
-
|
|
53250
|
-
|
|
53255
|
+
/*isOptional*/
|
|
53256
|
+
true
|
|
53257
|
+
);
|
|
53251
53258
|
}
|
|
53252
53259
|
function isTypeAny(type) {
|
|
53253
53260
|
return type && (type.flags & 1 /* Any */) !== 0;
|
|
@@ -64249,12 +64256,7 @@ ${lanes.join("\n")}
|
|
|
64249
64256
|
let matched = false;
|
|
64250
64257
|
for (let i = 0; i < types.length; i++) {
|
|
64251
64258
|
if (include[i]) {
|
|
64252
|
-
const targetType =
|
|
64253
|
-
types[i],
|
|
64254
|
-
propertyName,
|
|
64255
|
-
/*addOptionalityToIndex*/
|
|
64256
|
-
true
|
|
64257
|
-
);
|
|
64259
|
+
const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName);
|
|
64258
64260
|
if (targetType && related(getDiscriminatingType(), targetType)) {
|
|
64259
64261
|
matched = true;
|
|
64260
64262
|
} else {
|
|
@@ -67652,12 +67654,7 @@ ${lanes.join("\n")}
|
|
|
67652
67654
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
67653
67655
|
const narrowedPropType = narrowType2(propType);
|
|
67654
67656
|
return filterType(type, (t) => {
|
|
67655
|
-
const discriminantType = getTypeOfPropertyOrIndexSignature(
|
|
67656
|
-
t,
|
|
67657
|
-
propName,
|
|
67658
|
-
/*addOptionalityToIndex*/
|
|
67659
|
-
false
|
|
67660
|
-
);
|
|
67657
|
+
const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName);
|
|
67661
67658
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
67662
67659
|
});
|
|
67663
67660
|
}
|
|
@@ -155953,7 +155950,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155953
155950
|
}
|
|
155954
155951
|
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) {
|
|
155955
155952
|
const start = timestamp();
|
|
155956
|
-
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
|
|
155953
|
+
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
|
|
155957
155954
|
const useSemicolons = probablyUsesSemicolons(sourceFile);
|
|
155958
155955
|
const typeChecker = program.getTypeChecker();
|
|
155959
155956
|
const uniques = /* @__PURE__ */ new Map();
|
|
@@ -158117,11 +158114,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158117
158114
|
return true;
|
|
158118
158115
|
return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
|
|
158119
158116
|
}
|
|
158120
|
-
function getVariableOrParameterDeclaration(contextToken) {
|
|
158117
|
+
function getVariableOrParameterDeclaration(contextToken, location) {
|
|
158121
158118
|
if (!contextToken)
|
|
158122
158119
|
return;
|
|
158123
|
-
const
|
|
158124
|
-
|
|
158120
|
+
const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
|
|
158121
|
+
const possiblyVariableDeclaration = findAncestor(location, (node) => {
|
|
158122
|
+
return isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node);
|
|
158123
|
+
});
|
|
158124
|
+
return possiblyParameterDeclaration || possiblyVariableDeclaration;
|
|
158125
158125
|
}
|
|
158126
158126
|
function isArrowFunctionBody(node) {
|
|
158127
158127
|
return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
|
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.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230622`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6237,7 +6237,7 @@ ${lanes.join("\n")}
|
|
|
6237
6237
|
disableCPUProfiler,
|
|
6238
6238
|
cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
|
|
6239
6239
|
realpath,
|
|
6240
|
-
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
|
|
6240
|
+
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
|
|
6241
6241
|
tryEnableSourceMapsForHost() {
|
|
6242
6242
|
try {
|
|
6243
6243
|
require("source-map-support").install();
|
|
@@ -31305,7 +31305,7 @@ ${lanes.join("\n")}
|
|
|
31305
31305
|
}
|
|
31306
31306
|
const pos = getNodePos();
|
|
31307
31307
|
const type = parseUnionTypeOrHigher();
|
|
31308
|
-
if (!inDisallowConditionalTypesContext() &&
|
|
31308
|
+
if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(96 /* ExtendsKeyword */)) {
|
|
31309
31309
|
const extendsType = disallowConditionalTypesAnd(parseType);
|
|
31310
31310
|
parseExpected(58 /* QuestionToken */);
|
|
31311
31311
|
const trueType = allowConditionalTypesAnd(parseType);
|
|
@@ -31315,9 +31315,6 @@ ${lanes.join("\n")}
|
|
|
31315
31315
|
}
|
|
31316
31316
|
return type;
|
|
31317
31317
|
}
|
|
31318
|
-
function parseConditionalTypeExtends() {
|
|
31319
|
-
return parseOptional(96 /* ExtendsKeyword */) && !(parseOptional(58 /* QuestionToken */) || parseOptional(59 /* ColonToken */));
|
|
31320
|
-
}
|
|
31321
31318
|
function parseTypeAnnotation() {
|
|
31322
31319
|
return parseOptional(59 /* ColonToken */) ? parseType() : void 0;
|
|
31323
31320
|
}
|
|
@@ -45612,14 +45609,19 @@ ${lanes.join("\n")}
|
|
|
45612
45609
|
typeHasCallOrConstructSignatures
|
|
45613
45610
|
};
|
|
45614
45611
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
45615
|
-
const
|
|
45616
|
-
|
|
45617
|
-
|
|
45618
|
-
|
|
45612
|
+
const cachedSignatures = [];
|
|
45613
|
+
while (node) {
|
|
45614
|
+
if (isCallLikeExpression(node)) {
|
|
45615
|
+
const nodeLinks2 = getNodeLinks(node);
|
|
45616
|
+
const resolvedSignature = nodeLinks2.resolvedSignature;
|
|
45617
|
+
cachedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
45618
|
+
nodeLinks2.resolvedSignature = void 0;
|
|
45619
|
+
}
|
|
45620
|
+
node = node.parent;
|
|
45619
45621
|
}
|
|
45620
45622
|
const result = fn();
|
|
45621
|
-
|
|
45622
|
-
|
|
45623
|
+
for (const [nodeLinks2, resolvedSignature] of cachedSignatures) {
|
|
45624
|
+
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
45623
45625
|
}
|
|
45624
45626
|
return result;
|
|
45625
45627
|
}
|
|
@@ -53239,15 +53241,20 @@ ${lanes.join("\n")}
|
|
|
53239
53241
|
const prop = getPropertyOfType(type, name);
|
|
53240
53242
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
53241
53243
|
}
|
|
53242
|
-
function getTypeOfPropertyOrIndexSignature(type, name
|
|
53244
|
+
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
53245
|
+
var _a;
|
|
53246
|
+
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
53247
|
+
}
|
|
53248
|
+
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
53243
53249
|
var _a;
|
|
53244
53250
|
let propType;
|
|
53245
53251
|
return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality(
|
|
53246
53252
|
propType,
|
|
53247
53253
|
/*isProperty*/
|
|
53248
53254
|
true,
|
|
53249
|
-
|
|
53250
|
-
|
|
53255
|
+
/*isOptional*/
|
|
53256
|
+
true
|
|
53257
|
+
);
|
|
53251
53258
|
}
|
|
53252
53259
|
function isTypeAny(type) {
|
|
53253
53260
|
return type && (type.flags & 1 /* Any */) !== 0;
|
|
@@ -64249,12 +64256,7 @@ ${lanes.join("\n")}
|
|
|
64249
64256
|
let matched = false;
|
|
64250
64257
|
for (let i = 0; i < types.length; i++) {
|
|
64251
64258
|
if (include[i]) {
|
|
64252
|
-
const targetType =
|
|
64253
|
-
types[i],
|
|
64254
|
-
propertyName,
|
|
64255
|
-
/*addOptionalityToIndex*/
|
|
64256
|
-
true
|
|
64257
|
-
);
|
|
64259
|
+
const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName);
|
|
64258
64260
|
if (targetType && related(getDiscriminatingType(), targetType)) {
|
|
64259
64261
|
matched = true;
|
|
64260
64262
|
} else {
|
|
@@ -67652,12 +67654,7 @@ ${lanes.join("\n")}
|
|
|
67652
67654
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
67653
67655
|
const narrowedPropType = narrowType2(propType);
|
|
67654
67656
|
return filterType(type, (t) => {
|
|
67655
|
-
const discriminantType = getTypeOfPropertyOrIndexSignature(
|
|
67656
|
-
t,
|
|
67657
|
-
propName,
|
|
67658
|
-
/*addOptionalityToIndex*/
|
|
67659
|
-
false
|
|
67660
|
-
);
|
|
67657
|
+
const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName);
|
|
67661
67658
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
67662
67659
|
});
|
|
67663
67660
|
}
|
|
@@ -155968,7 +155965,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155968
155965
|
}
|
|
155969
155966
|
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) {
|
|
155970
155967
|
const start = timestamp();
|
|
155971
|
-
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
|
|
155968
|
+
const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
|
|
155972
155969
|
const useSemicolons = probablyUsesSemicolons(sourceFile);
|
|
155973
155970
|
const typeChecker = program.getTypeChecker();
|
|
155974
155971
|
const uniques = /* @__PURE__ */ new Map();
|
|
@@ -158132,11 +158129,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158132
158129
|
return true;
|
|
158133
158130
|
return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
|
|
158134
158131
|
}
|
|
158135
|
-
function getVariableOrParameterDeclaration(contextToken) {
|
|
158132
|
+
function getVariableOrParameterDeclaration(contextToken, location) {
|
|
158136
158133
|
if (!contextToken)
|
|
158137
158134
|
return;
|
|
158138
|
-
const
|
|
158139
|
-
|
|
158135
|
+
const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
|
|
158136
|
+
const possiblyVariableDeclaration = findAncestor(location, (node) => {
|
|
158137
|
+
return isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node);
|
|
158138
|
+
});
|
|
158139
|
+
return possiblyParameterDeclaration || possiblyVariableDeclaration;
|
|
158140
158140
|
}
|
|
158141
158141
|
function isArrowFunctionBody(node) {
|
|
158142
158142
|
return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
|
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.2";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230622`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -4367,7 +4367,7 @@ var sys = (() => {
|
|
|
4367
4367
|
disableCPUProfiler,
|
|
4368
4368
|
cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
|
|
4369
4369
|
realpath,
|
|
4370
|
-
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
|
|
4370
|
+
debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
|
|
4371
4371
|
tryEnableSourceMapsForHost() {
|
|
4372
4372
|
try {
|
|
4373
4373
|
require("source-map-support").install();
|
|
@@ -20844,7 +20844,7 @@ var Parser;
|
|
|
20844
20844
|
}
|
|
20845
20845
|
const pos = getNodePos();
|
|
20846
20846
|
const type = parseUnionTypeOrHigher();
|
|
20847
|
-
if (!inDisallowConditionalTypesContext() &&
|
|
20847
|
+
if (!inDisallowConditionalTypesContext() && !scanner.hasPrecedingLineBreak() && parseOptional(96 /* ExtendsKeyword */)) {
|
|
20848
20848
|
const extendsType = disallowConditionalTypesAnd(parseType);
|
|
20849
20849
|
parseExpected(58 /* QuestionToken */);
|
|
20850
20850
|
const trueType = allowConditionalTypesAnd(parseType);
|
|
@@ -20854,9 +20854,6 @@ var Parser;
|
|
|
20854
20854
|
}
|
|
20855
20855
|
return type;
|
|
20856
20856
|
}
|
|
20857
|
-
function parseConditionalTypeExtends() {
|
|
20858
|
-
return parseOptional(96 /* ExtendsKeyword */) && !(parseOptional(58 /* QuestionToken */) || parseOptional(59 /* ColonToken */));
|
|
20859
|
-
}
|
|
20860
20857
|
function parseTypeAnnotation() {
|
|
20861
20858
|
return parseOptional(59 /* ColonToken */) ? parseType() : void 0;
|
|
20862
20859
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.2.0-pr-
|
|
5
|
+
"version": "5.2.0-pr-54656-5",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "f665b3b7960812f0b868aaf0c6d95d240e6382a1"
|
|
119
119
|
}
|