@typescript-deploys/pr-build 5.5.0-pr-55267-165 → 5.6.0-pr-57196-3
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 +64 -47
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +142 -70
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -17,8 +17,8 @@ and limitations under the License.
|
|
|
17
17
|
"use strict";
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
|
-
var versionMajorMinor = "5.
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
20
|
+
var versionMajorMinor = "5.6";
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240603`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -49284,7 +49284,7 @@ function createTypeChecker(host) {
|
|
|
49284
49284
|
return noMappedTypes && mappedType !== type ? void 0 : mappedType;
|
|
49285
49285
|
}
|
|
49286
49286
|
function setTextRange2(context, range, location) {
|
|
49287
|
-
if (!nodeIsSynthesized(range)
|
|
49287
|
+
if (!nodeIsSynthesized(range) || !(range.flags & 16 /* Synthesized */) || !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(range))) {
|
|
49288
49288
|
range = factory.cloneNode(range);
|
|
49289
49289
|
}
|
|
49290
49290
|
if (range === location) return range;
|
|
@@ -50223,7 +50223,8 @@ function createTypeChecker(host) {
|
|
|
50223
50223
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
50224
50224
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
50225
50225
|
typeElements.push(
|
|
50226
|
-
|
|
50226
|
+
setCommentRange2(
|
|
50227
|
+
context,
|
|
50227
50228
|
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
50228
50229
|
getterDeclaration
|
|
50229
50230
|
)
|
|
@@ -50231,7 +50232,8 @@ function createTypeChecker(host) {
|
|
|
50231
50232
|
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
50232
50233
|
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
50233
50234
|
typeElements.push(
|
|
50234
|
-
|
|
50235
|
+
setCommentRange2(
|
|
50236
|
+
context,
|
|
50235
50237
|
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
50236
50238
|
setterDeclaration
|
|
50237
50239
|
)
|
|
@@ -50289,11 +50291,17 @@ function createTypeChecker(host) {
|
|
|
50289
50291
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
50290
50292
|
}
|
|
50291
50293
|
} else if (propertySymbol.valueDeclaration) {
|
|
50292
|
-
|
|
50294
|
+
setCommentRange2(context, node, propertySymbol.valueDeclaration);
|
|
50293
50295
|
}
|
|
50294
50296
|
return node;
|
|
50295
50297
|
}
|
|
50296
50298
|
}
|
|
50299
|
+
function setCommentRange2(context, node, range) {
|
|
50300
|
+
if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(range)) {
|
|
50301
|
+
return setCommentRange(node, range);
|
|
50302
|
+
}
|
|
50303
|
+
return node;
|
|
50304
|
+
}
|
|
50297
50305
|
function mapToTypeNodes(types, context, isBareList) {
|
|
50298
50306
|
if (some(types)) {
|
|
50299
50307
|
if (checkTruncationLength(context)) {
|
|
@@ -51069,7 +51077,7 @@ function createTypeChecker(host) {
|
|
|
51069
51077
|
return false;
|
|
51070
51078
|
}
|
|
51071
51079
|
function typeParameterToName(type, context) {
|
|
51072
|
-
var _a, _b;
|
|
51080
|
+
var _a, _b, _c, _d;
|
|
51073
51081
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) {
|
|
51074
51082
|
const cached = context.typeParameterNames.get(getTypeId(type));
|
|
51075
51083
|
if (cached) {
|
|
@@ -51086,11 +51094,15 @@ function createTypeChecker(host) {
|
|
|
51086
51094
|
if (!(result.kind & 80 /* Identifier */)) {
|
|
51087
51095
|
return factory.createIdentifier("(Missing type parameter)");
|
|
51088
51096
|
}
|
|
51097
|
+
const decl = (_b = (_a = type.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0];
|
|
51098
|
+
if (decl && isTypeParameterDeclaration(decl)) {
|
|
51099
|
+
result = setTextRange2(context, result, decl.name);
|
|
51100
|
+
}
|
|
51089
51101
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51090
51102
|
const rawtext = result.escapedText;
|
|
51091
|
-
let i = ((
|
|
51103
|
+
let i = ((_c = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _c.get(rawtext)) || 0;
|
|
51092
51104
|
let text = rawtext;
|
|
51093
|
-
while (((
|
|
51105
|
+
while (((_d = context.typeParameterNamesByText) == null ? void 0 : _d.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
51094
51106
|
i++;
|
|
51095
51107
|
text = `${rawtext}_${i}`;
|
|
51096
51108
|
}
|
|
@@ -51529,13 +51541,14 @@ function createTypeChecker(host) {
|
|
|
51529
51541
|
}
|
|
51530
51542
|
return node;
|
|
51531
51543
|
}
|
|
51532
|
-
return result
|
|
51544
|
+
return result ? setTextRange2(context, result, node) : void 0;
|
|
51533
51545
|
}
|
|
51534
51546
|
function createRecoveryBoundary() {
|
|
51547
|
+
let trackedSymbols;
|
|
51535
51548
|
let unreportedErrors;
|
|
51536
51549
|
const oldTracker = context.tracker;
|
|
51537
51550
|
const oldTrackedSymbols = context.trackedSymbols;
|
|
51538
|
-
context.trackedSymbols =
|
|
51551
|
+
context.trackedSymbols = void 0;
|
|
51539
51552
|
const oldEncounteredError = context.encounteredError;
|
|
51540
51553
|
context.tracker = new SymbolTrackerImpl(context, {
|
|
51541
51554
|
...oldTracker.inner,
|
|
@@ -51555,17 +51568,7 @@ function createTypeChecker(host) {
|
|
|
51555
51568
|
markError(() => oldTracker.reportNonSerializableProperty(name));
|
|
51556
51569
|
},
|
|
51557
51570
|
trackSymbol(sym, decl, meaning) {
|
|
51558
|
-
|
|
51559
|
-
sym,
|
|
51560
|
-
decl,
|
|
51561
|
-
meaning,
|
|
51562
|
-
/*shouldComputeAliasesToMakeVisible*/
|
|
51563
|
-
false
|
|
51564
|
-
);
|
|
51565
|
-
if (accessibility.accessibility !== 0 /* Accessible */) {
|
|
51566
|
-
(context.trackedSymbols ?? (context.trackedSymbols = [])).push([sym, decl, meaning]);
|
|
51567
|
-
return true;
|
|
51568
|
-
}
|
|
51571
|
+
(trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]);
|
|
51569
51572
|
return false;
|
|
51570
51573
|
},
|
|
51571
51574
|
moduleResolverHost: context.tracker.moduleResolverHost
|
|
@@ -51579,13 +51582,12 @@ function createTypeChecker(host) {
|
|
|
51579
51582
|
(unreportedErrors ?? (unreportedErrors = [])).push(unreportedError);
|
|
51580
51583
|
}
|
|
51581
51584
|
function startRecoveryScope2() {
|
|
51582
|
-
|
|
51583
|
-
const initialTrackedSymbolsTop = ((_a = context.trackedSymbols) == null ? void 0 : _a.length) ?? 0;
|
|
51585
|
+
const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0;
|
|
51584
51586
|
const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0;
|
|
51585
51587
|
return () => {
|
|
51586
51588
|
hadError = false;
|
|
51587
|
-
if (
|
|
51588
|
-
|
|
51589
|
+
if (trackedSymbols) {
|
|
51590
|
+
trackedSymbols.length = trackedSymbolsTop;
|
|
51589
51591
|
}
|
|
51590
51592
|
if (unreportedErrors) {
|
|
51591
51593
|
unreportedErrors.length = unreportedErrorsTop;
|
|
@@ -51594,14 +51596,13 @@ function createTypeChecker(host) {
|
|
|
51594
51596
|
}
|
|
51595
51597
|
function finalizeBoundary2() {
|
|
51596
51598
|
context.tracker = oldTracker;
|
|
51597
|
-
const newTrackedSymbols = context.trackedSymbols;
|
|
51598
51599
|
context.trackedSymbols = oldTrackedSymbols;
|
|
51599
51600
|
context.encounteredError = oldEncounteredError;
|
|
51600
51601
|
unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn());
|
|
51601
51602
|
if (hadError) {
|
|
51602
51603
|
return false;
|
|
51603
51604
|
}
|
|
51604
|
-
|
|
51605
|
+
trackedSymbols == null ? void 0 : trackedSymbols.forEach(
|
|
51605
51606
|
([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
|
|
51606
51607
|
symbol,
|
|
51607
51608
|
enclosingDeclaration,
|
|
@@ -51785,12 +51786,7 @@ function createTypeChecker(host) {
|
|
|
51785
51786
|
}
|
|
51786
51787
|
}
|
|
51787
51788
|
if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) {
|
|
51788
|
-
let visited =
|
|
51789
|
-
node,
|
|
51790
|
-
visitExistingNodeTreeSymbols,
|
|
51791
|
-
/*context*/
|
|
51792
|
-
void 0
|
|
51793
|
-
);
|
|
51789
|
+
let visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
51794
51790
|
if (visited === node) {
|
|
51795
51791
|
visited = setTextRange2(context, factory.cloneNode(node), node);
|
|
51796
51792
|
}
|
|
@@ -51851,12 +51847,7 @@ function createTypeChecker(host) {
|
|
|
51851
51847
|
return factory.updateTypePredicateNode(node, node.assertsModifier, parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
51852
51848
|
}
|
|
51853
51849
|
if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) {
|
|
51854
|
-
const visited =
|
|
51855
|
-
node,
|
|
51856
|
-
visitExistingNodeTreeSymbols,
|
|
51857
|
-
/*context*/
|
|
51858
|
-
void 0
|
|
51859
|
-
);
|
|
51850
|
+
const visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
51860
51851
|
const clone = setTextRange2(context, visited === node ? factory.cloneNode(node) : visited, node);
|
|
51861
51852
|
const flags = getEmitFlags(clone);
|
|
51862
51853
|
setEmitFlags(clone, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */));
|
|
@@ -51899,12 +51890,29 @@ function createTypeChecker(host) {
|
|
|
51899
51890
|
}
|
|
51900
51891
|
}
|
|
51901
51892
|
}
|
|
51902
|
-
return
|
|
51903
|
-
|
|
51904
|
-
|
|
51905
|
-
|
|
51906
|
-
|
|
51907
|
-
|
|
51893
|
+
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
51894
|
+
function visitEachChild2(node2, visitor) {
|
|
51895
|
+
const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2);
|
|
51896
|
+
return visitEachChild(
|
|
51897
|
+
node2,
|
|
51898
|
+
visitor,
|
|
51899
|
+
/*context*/
|
|
51900
|
+
void 0,
|
|
51901
|
+
nonlocalNode ? visitNodesWithoutCopyingPositions : void 0
|
|
51902
|
+
);
|
|
51903
|
+
}
|
|
51904
|
+
function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) {
|
|
51905
|
+
let result = visitNodes2(nodes, visitor, test, start, count);
|
|
51906
|
+
if (result) {
|
|
51907
|
+
if (result.pos !== -1 || result.end !== -1) {
|
|
51908
|
+
if (result === nodes) {
|
|
51909
|
+
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
|
51910
|
+
}
|
|
51911
|
+
setTextRangePosEnd(result, -1, -1);
|
|
51912
|
+
}
|
|
51913
|
+
}
|
|
51914
|
+
return result;
|
|
51915
|
+
}
|
|
51908
51916
|
function getEffectiveDotDotDotForParameter(p) {
|
|
51909
51917
|
return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0);
|
|
51910
51918
|
}
|
|
@@ -56970,7 +56978,16 @@ function createTypeChecker(host) {
|
|
|
56970
56978
|
}
|
|
56971
56979
|
}
|
|
56972
56980
|
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
|
56973
|
-
|
|
56981
|
+
if (type === thisArgument) {
|
|
56982
|
+
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
56983
|
+
type,
|
|
56984
|
+
thisArgument,
|
|
56985
|
+
/*needApparentType*/
|
|
56986
|
+
true
|
|
56987
|
+
));
|
|
56988
|
+
}
|
|
56989
|
+
const key = `I${getTypeId(type)},${getTypeId(thisArgument)}`;
|
|
56990
|
+
return getCachedType(key) ?? setCachedType(key, getTypeWithThisArgument(
|
|
56974
56991
|
type,
|
|
56975
56992
|
thisArgument,
|
|
56976
56993
|
/*needApparentType*/
|
package/lib/typescript.d.ts
CHANGED
|
@@ -3616,7 +3616,7 @@ declare namespace ts {
|
|
|
3616
3616
|
readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[];
|
|
3617
3617
|
}
|
|
3618
3618
|
}
|
|
3619
|
-
const versionMajorMinor = "5.
|
|
3619
|
+
const versionMajorMinor = "5.6";
|
|
3620
3620
|
/** The version of the TypeScript compiler release */
|
|
3621
3621
|
const version: string;
|
|
3622
3622
|
/**
|
package/lib/typescript.js
CHANGED
|
@@ -2370,8 +2370,8 @@ __export(typescript_exports, {
|
|
|
2370
2370
|
module.exports = __toCommonJS(typescript_exports);
|
|
2371
2371
|
|
|
2372
2372
|
// src/compiler/corePublic.ts
|
|
2373
|
-
var versionMajorMinor = "5.
|
|
2374
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2373
|
+
var versionMajorMinor = "5.6";
|
|
2374
|
+
var version = `${versionMajorMinor}.0-insiders.20240603`;
|
|
2375
2375
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2376
2376
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2377
2377
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -54053,7 +54053,7 @@ function createTypeChecker(host) {
|
|
|
54053
54053
|
return noMappedTypes && mappedType !== type ? void 0 : mappedType;
|
|
54054
54054
|
}
|
|
54055
54055
|
function setTextRange2(context, range, location) {
|
|
54056
|
-
if (!nodeIsSynthesized(range)
|
|
54056
|
+
if (!nodeIsSynthesized(range) || !(range.flags & 16 /* Synthesized */) || !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(range))) {
|
|
54057
54057
|
range = factory.cloneNode(range);
|
|
54058
54058
|
}
|
|
54059
54059
|
if (range === location) return range;
|
|
@@ -54992,7 +54992,8 @@ function createTypeChecker(host) {
|
|
|
54992
54992
|
const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
|
|
54993
54993
|
const getterSignature = getSignatureFromDeclaration(getterDeclaration);
|
|
54994
54994
|
typeElements.push(
|
|
54995
|
-
|
|
54995
|
+
setCommentRange2(
|
|
54996
|
+
context,
|
|
54996
54997
|
signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
|
|
54997
54998
|
getterDeclaration
|
|
54998
54999
|
)
|
|
@@ -55000,7 +55001,8 @@ function createTypeChecker(host) {
|
|
|
55000
55001
|
const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
|
|
55001
55002
|
const setterSignature = getSignatureFromDeclaration(setterDeclaration);
|
|
55002
55003
|
typeElements.push(
|
|
55003
|
-
|
|
55004
|
+
setCommentRange2(
|
|
55005
|
+
context,
|
|
55004
55006
|
signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
|
|
55005
55007
|
setterDeclaration
|
|
55006
55008
|
)
|
|
@@ -55058,11 +55060,17 @@ function createTypeChecker(host) {
|
|
|
55058
55060
|
setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
|
|
55059
55061
|
}
|
|
55060
55062
|
} else if (propertySymbol.valueDeclaration) {
|
|
55061
|
-
|
|
55063
|
+
setCommentRange2(context, node, propertySymbol.valueDeclaration);
|
|
55062
55064
|
}
|
|
55063
55065
|
return node;
|
|
55064
55066
|
}
|
|
55065
55067
|
}
|
|
55068
|
+
function setCommentRange2(context, node, range) {
|
|
55069
|
+
if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(range)) {
|
|
55070
|
+
return setCommentRange(node, range);
|
|
55071
|
+
}
|
|
55072
|
+
return node;
|
|
55073
|
+
}
|
|
55066
55074
|
function mapToTypeNodes(types, context, isBareList) {
|
|
55067
55075
|
if (some(types)) {
|
|
55068
55076
|
if (checkTruncationLength(context)) {
|
|
@@ -55838,7 +55846,7 @@ function createTypeChecker(host) {
|
|
|
55838
55846
|
return false;
|
|
55839
55847
|
}
|
|
55840
55848
|
function typeParameterToName(type, context) {
|
|
55841
|
-
var _a, _b;
|
|
55849
|
+
var _a, _b, _c, _d;
|
|
55842
55850
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) {
|
|
55843
55851
|
const cached = context.typeParameterNames.get(getTypeId(type));
|
|
55844
55852
|
if (cached) {
|
|
@@ -55855,11 +55863,15 @@ function createTypeChecker(host) {
|
|
|
55855
55863
|
if (!(result.kind & 80 /* Identifier */)) {
|
|
55856
55864
|
return factory.createIdentifier("(Missing type parameter)");
|
|
55857
55865
|
}
|
|
55866
|
+
const decl = (_b = (_a = type.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0];
|
|
55867
|
+
if (decl && isTypeParameterDeclaration(decl)) {
|
|
55868
|
+
result = setTextRange2(context, result, decl.name);
|
|
55869
|
+
}
|
|
55858
55870
|
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
55859
55871
|
const rawtext = result.escapedText;
|
|
55860
|
-
let i = ((
|
|
55872
|
+
let i = ((_c = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _c.get(rawtext)) || 0;
|
|
55861
55873
|
let text = rawtext;
|
|
55862
|
-
while (((
|
|
55874
|
+
while (((_d = context.typeParameterNamesByText) == null ? void 0 : _d.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
55863
55875
|
i++;
|
|
55864
55876
|
text = `${rawtext}_${i}`;
|
|
55865
55877
|
}
|
|
@@ -56298,13 +56310,14 @@ function createTypeChecker(host) {
|
|
|
56298
56310
|
}
|
|
56299
56311
|
return node;
|
|
56300
56312
|
}
|
|
56301
|
-
return result
|
|
56313
|
+
return result ? setTextRange2(context, result, node) : void 0;
|
|
56302
56314
|
}
|
|
56303
56315
|
function createRecoveryBoundary() {
|
|
56316
|
+
let trackedSymbols;
|
|
56304
56317
|
let unreportedErrors;
|
|
56305
56318
|
const oldTracker = context.tracker;
|
|
56306
56319
|
const oldTrackedSymbols = context.trackedSymbols;
|
|
56307
|
-
context.trackedSymbols =
|
|
56320
|
+
context.trackedSymbols = void 0;
|
|
56308
56321
|
const oldEncounteredError = context.encounteredError;
|
|
56309
56322
|
context.tracker = new SymbolTrackerImpl(context, {
|
|
56310
56323
|
...oldTracker.inner,
|
|
@@ -56324,17 +56337,7 @@ function createTypeChecker(host) {
|
|
|
56324
56337
|
markError(() => oldTracker.reportNonSerializableProperty(name));
|
|
56325
56338
|
},
|
|
56326
56339
|
trackSymbol(sym, decl, meaning) {
|
|
56327
|
-
|
|
56328
|
-
sym,
|
|
56329
|
-
decl,
|
|
56330
|
-
meaning,
|
|
56331
|
-
/*shouldComputeAliasesToMakeVisible*/
|
|
56332
|
-
false
|
|
56333
|
-
);
|
|
56334
|
-
if (accessibility.accessibility !== 0 /* Accessible */) {
|
|
56335
|
-
(context.trackedSymbols ?? (context.trackedSymbols = [])).push([sym, decl, meaning]);
|
|
56336
|
-
return true;
|
|
56337
|
-
}
|
|
56340
|
+
(trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]);
|
|
56338
56341
|
return false;
|
|
56339
56342
|
},
|
|
56340
56343
|
moduleResolverHost: context.tracker.moduleResolverHost
|
|
@@ -56348,13 +56351,12 @@ function createTypeChecker(host) {
|
|
|
56348
56351
|
(unreportedErrors ?? (unreportedErrors = [])).push(unreportedError);
|
|
56349
56352
|
}
|
|
56350
56353
|
function startRecoveryScope2() {
|
|
56351
|
-
|
|
56352
|
-
const initialTrackedSymbolsTop = ((_a = context.trackedSymbols) == null ? void 0 : _a.length) ?? 0;
|
|
56354
|
+
const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0;
|
|
56353
56355
|
const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0;
|
|
56354
56356
|
return () => {
|
|
56355
56357
|
hadError = false;
|
|
56356
|
-
if (
|
|
56357
|
-
|
|
56358
|
+
if (trackedSymbols) {
|
|
56359
|
+
trackedSymbols.length = trackedSymbolsTop;
|
|
56358
56360
|
}
|
|
56359
56361
|
if (unreportedErrors) {
|
|
56360
56362
|
unreportedErrors.length = unreportedErrorsTop;
|
|
@@ -56363,14 +56365,13 @@ function createTypeChecker(host) {
|
|
|
56363
56365
|
}
|
|
56364
56366
|
function finalizeBoundary2() {
|
|
56365
56367
|
context.tracker = oldTracker;
|
|
56366
|
-
const newTrackedSymbols = context.trackedSymbols;
|
|
56367
56368
|
context.trackedSymbols = oldTrackedSymbols;
|
|
56368
56369
|
context.encounteredError = oldEncounteredError;
|
|
56369
56370
|
unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn());
|
|
56370
56371
|
if (hadError) {
|
|
56371
56372
|
return false;
|
|
56372
56373
|
}
|
|
56373
|
-
|
|
56374
|
+
trackedSymbols == null ? void 0 : trackedSymbols.forEach(
|
|
56374
56375
|
([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
|
|
56375
56376
|
symbol,
|
|
56376
56377
|
enclosingDeclaration,
|
|
@@ -56554,12 +56555,7 @@ function createTypeChecker(host) {
|
|
|
56554
56555
|
}
|
|
56555
56556
|
}
|
|
56556
56557
|
if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) {
|
|
56557
|
-
let visited =
|
|
56558
|
-
node,
|
|
56559
|
-
visitExistingNodeTreeSymbols,
|
|
56560
|
-
/*context*/
|
|
56561
|
-
void 0
|
|
56562
|
-
);
|
|
56558
|
+
let visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
56563
56559
|
if (visited === node) {
|
|
56564
56560
|
visited = setTextRange2(context, factory.cloneNode(node), node);
|
|
56565
56561
|
}
|
|
@@ -56620,12 +56616,7 @@ function createTypeChecker(host) {
|
|
|
56620
56616
|
return factory.updateTypePredicateNode(node, node.assertsModifier, parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
56621
56617
|
}
|
|
56622
56618
|
if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) {
|
|
56623
|
-
const visited =
|
|
56624
|
-
node,
|
|
56625
|
-
visitExistingNodeTreeSymbols,
|
|
56626
|
-
/*context*/
|
|
56627
|
-
void 0
|
|
56628
|
-
);
|
|
56619
|
+
const visited = visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
56629
56620
|
const clone2 = setTextRange2(context, visited === node ? factory.cloneNode(node) : visited, node);
|
|
56630
56621
|
const flags = getEmitFlags(clone2);
|
|
56631
56622
|
setEmitFlags(clone2, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */));
|
|
@@ -56668,12 +56659,29 @@ function createTypeChecker(host) {
|
|
|
56668
56659
|
}
|
|
56669
56660
|
}
|
|
56670
56661
|
}
|
|
56671
|
-
return
|
|
56672
|
-
|
|
56673
|
-
|
|
56674
|
-
|
|
56675
|
-
|
|
56676
|
-
|
|
56662
|
+
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
56663
|
+
function visitEachChild2(node2, visitor) {
|
|
56664
|
+
const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2);
|
|
56665
|
+
return visitEachChild(
|
|
56666
|
+
node2,
|
|
56667
|
+
visitor,
|
|
56668
|
+
/*context*/
|
|
56669
|
+
void 0,
|
|
56670
|
+
nonlocalNode ? visitNodesWithoutCopyingPositions : void 0
|
|
56671
|
+
);
|
|
56672
|
+
}
|
|
56673
|
+
function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) {
|
|
56674
|
+
let result = visitNodes2(nodes, visitor, test, start, count);
|
|
56675
|
+
if (result) {
|
|
56676
|
+
if (result.pos !== -1 || result.end !== -1) {
|
|
56677
|
+
if (result === nodes) {
|
|
56678
|
+
result = factory.createNodeArray(nodes, nodes.hasTrailingComma);
|
|
56679
|
+
}
|
|
56680
|
+
setTextRangePosEnd(result, -1, -1);
|
|
56681
|
+
}
|
|
56682
|
+
}
|
|
56683
|
+
return result;
|
|
56684
|
+
}
|
|
56677
56685
|
function getEffectiveDotDotDotForParameter(p) {
|
|
56678
56686
|
return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0);
|
|
56679
56687
|
}
|
|
@@ -61739,7 +61747,16 @@ function createTypeChecker(host) {
|
|
|
61739
61747
|
}
|
|
61740
61748
|
}
|
|
61741
61749
|
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
|
61742
|
-
|
|
61750
|
+
if (type === thisArgument) {
|
|
61751
|
+
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
61752
|
+
type,
|
|
61753
|
+
thisArgument,
|
|
61754
|
+
/*needApparentType*/
|
|
61755
|
+
true
|
|
61756
|
+
));
|
|
61757
|
+
}
|
|
61758
|
+
const key = `I${getTypeId(type)},${getTypeId(thisArgument)}`;
|
|
61759
|
+
return getCachedType(key) ?? setCachedType(key, getTypeWithThisArgument(
|
|
61743
61760
|
type,
|
|
61744
61761
|
thisArgument,
|
|
61745
61762
|
/*needApparentType*/
|
|
@@ -158659,6 +158676,7 @@ function withContext(context, typePrintMode, cb) {
|
|
|
158659
158676
|
textChanges: changeTracker.getChanges()
|
|
158660
158677
|
};
|
|
158661
158678
|
function addTypeAnnotation(span) {
|
|
158679
|
+
context.cancellationToken.throwIfCancellationRequested();
|
|
158662
158680
|
const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);
|
|
158663
158681
|
const expandoFunction = findExpandoFunction(nodeWithDiag);
|
|
158664
158682
|
if (expandoFunction) {
|
|
@@ -158730,6 +158748,7 @@ function withContext(context, typePrintMode, cb) {
|
|
|
158730
158748
|
return factory.createAsExpression(factory.createSatisfiesExpression(node, getSynthesizedDeepClone(type)), type);
|
|
158731
158749
|
}
|
|
158732
158750
|
function addInlineAssertion(span) {
|
|
158751
|
+
context.cancellationToken.throwIfCancellationRequested();
|
|
158733
158752
|
const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);
|
|
158734
158753
|
const expandoFunction = findExpandoFunction(nodeWithDiag);
|
|
158735
158754
|
if (expandoFunction) return;
|
|
@@ -158787,6 +158806,7 @@ function withContext(context, typePrintMode, cb) {
|
|
|
158787
158806
|
return [Diagnostics.Add_satisfies_and_an_inline_type_assertion_with_0, typeToStringForDiag(typeNode)];
|
|
158788
158807
|
}
|
|
158789
158808
|
function extractAsVariable(span) {
|
|
158809
|
+
context.cancellationToken.throwIfCancellationRequested();
|
|
158790
158810
|
const nodeWithDiag = getTokenAtPosition(sourceFile, span.start);
|
|
158791
158811
|
const targetNode = findBestFittingNode(nodeWithDiag, span);
|
|
158792
158812
|
if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return;
|
|
@@ -160697,7 +160717,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con
|
|
|
160697
160717
|
switch (kind) {
|
|
160698
160718
|
case 171 /* PropertySignature */:
|
|
160699
160719
|
case 172 /* PropertyDeclaration */:
|
|
160700
|
-
|
|
160720
|
+
let flags = 1 /* NoTruncation */;
|
|
160721
|
+
flags |= quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0;
|
|
160701
160722
|
let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context));
|
|
160702
160723
|
if (importAdder) {
|
|
160703
160724
|
const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
|
|
@@ -184660,8 +184681,23 @@ function findProjectByName(projectName, projects) {
|
|
|
184660
184681
|
}
|
|
184661
184682
|
var noopConfigFileWatcher = { close: noop };
|
|
184662
184683
|
function getConfigFileNameFromCache(info, cache) {
|
|
184663
|
-
if (!cache
|
|
184664
|
-
|
|
184684
|
+
if (!cache) return void 0;
|
|
184685
|
+
const configFileForOpenFile = cache.get(info.path);
|
|
184686
|
+
if (configFileForOpenFile === void 0) return void 0;
|
|
184687
|
+
if (!isAncestorConfigFileInfo(info)) {
|
|
184688
|
+
return isString(configFileForOpenFile) || !configFileForOpenFile ? configFileForOpenFile : (
|
|
184689
|
+
// direct result
|
|
184690
|
+
configFileForOpenFile.get(
|
|
184691
|
+
/*key*/
|
|
184692
|
+
false
|
|
184693
|
+
)
|
|
184694
|
+
);
|
|
184695
|
+
} else {
|
|
184696
|
+
return configFileForOpenFile && !isString(configFileForOpenFile) ? (
|
|
184697
|
+
// Map with fileName as key
|
|
184698
|
+
configFileForOpenFile.get(info.fileName)
|
|
184699
|
+
) : void 0;
|
|
184700
|
+
}
|
|
184665
184701
|
}
|
|
184666
184702
|
function isOpenScriptInfo(infoOrFileNameOrConfig) {
|
|
184667
184703
|
return !!infoOrFileNameOrConfig.containingProjects;
|
|
@@ -184675,13 +184711,15 @@ var ConfiguredProjectLoadKind = /* @__PURE__ */ ((ConfiguredProjectLoadKind2) =>
|
|
|
184675
184711
|
ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Reload"] = 2] = "Reload";
|
|
184676
184712
|
return ConfiguredProjectLoadKind2;
|
|
184677
184713
|
})(ConfiguredProjectLoadKind || {});
|
|
184678
|
-
function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, delayReloadedConfiguredProjects) {
|
|
184714
|
+
function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, searchOnlyPotentialSolution, delayReloadedConfiguredProjects) {
|
|
184679
184715
|
while (true) {
|
|
184680
|
-
if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project
|
|
184716
|
+
if (!project.isInitialLoadPending() && (searchOnlyPotentialSolution && !project.getCompilerOptions().composite || // TODO: Should this flag be shared between trying to load solution for find all references vs trying to find default project
|
|
184717
|
+
project.getCompilerOptions().disableSolutionSearching)) return;
|
|
184681
184718
|
const configFileName = project.projectService.getConfigFileNameForFile({
|
|
184682
184719
|
fileName: project.getConfigFilePath(),
|
|
184683
184720
|
path: info.path,
|
|
184684
|
-
configFileInfo: true
|
|
184721
|
+
configFileInfo: true,
|
|
184722
|
+
isForDefaultProject: !searchOnlyPotentialSolution
|
|
184685
184723
|
}, kind === 0 /* Find */);
|
|
184686
184724
|
if (!configFileName) return;
|
|
184687
184725
|
const ancestor = project.projectService.findCreateOrReloadConfiguredProject(
|
|
@@ -184689,11 +184727,11 @@ function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredCl
|
|
|
184689
184727
|
kind,
|
|
184690
184728
|
reason,
|
|
184691
184729
|
allowDeferredClosed,
|
|
184692
|
-
|
|
184693
|
-
|
|
184730
|
+
!searchOnlyPotentialSolution ? info.fileName : void 0,
|
|
184731
|
+
// Config Diag event for project if its for default project
|
|
184694
184732
|
reloadedProjects,
|
|
184695
|
-
|
|
184696
|
-
|
|
184733
|
+
searchOnlyPotentialSolution,
|
|
184734
|
+
// Delay load if we are searching for solution
|
|
184697
184735
|
delayReloadedConfiguredProjects
|
|
184698
184736
|
);
|
|
184699
184737
|
if (!ancestor) return;
|
|
@@ -185794,7 +185832,7 @@ var _ProjectService = class _ProjectService {
|
|
|
185794
185832
|
configFileExists(configFileName, canonicalConfigFilePath, info) {
|
|
185795
185833
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
185796
185834
|
let openFilesImpactedByConfigFile;
|
|
185797
|
-
if (this.openFiles.has(info.path) && !isAncestorConfigFileInfo(info)) {
|
|
185835
|
+
if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) {
|
|
185798
185836
|
if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);
|
|
185799
185837
|
else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path);
|
|
185800
185838
|
}
|
|
@@ -185922,24 +185960,31 @@ var _ProjectService = class _ProjectService {
|
|
|
185922
185960
|
let searchPath = asNormalizedPath(getDirectoryPath(info.fileName));
|
|
185923
185961
|
const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames);
|
|
185924
185962
|
const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot();
|
|
185925
|
-
let
|
|
185963
|
+
let searchTsconfig = true;
|
|
185964
|
+
let searchJsconfig = true;
|
|
185965
|
+
if (isAncestorConfigFileInfo(info)) {
|
|
185966
|
+
if (endsWith(info.fileName, "tsconfig.json")) searchTsconfig = false;
|
|
185967
|
+
else searchTsconfig = searchJsconfig = false;
|
|
185968
|
+
}
|
|
185926
185969
|
do {
|
|
185927
|
-
|
|
185928
|
-
|
|
185970
|
+
const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName);
|
|
185971
|
+
if (searchTsconfig) {
|
|
185929
185972
|
const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json"));
|
|
185930
|
-
|
|
185973
|
+
const result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName);
|
|
185931
185974
|
if (result) return tsconfigFileName;
|
|
185975
|
+
}
|
|
185976
|
+
if (searchJsconfig) {
|
|
185932
185977
|
const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json"));
|
|
185933
|
-
result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
|
|
185978
|
+
const result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
|
|
185934
185979
|
if (result) return jsconfigFileName;
|
|
185935
|
-
|
|
185936
|
-
|
|
185937
|
-
|
|
185980
|
+
}
|
|
185981
|
+
if (isNodeModulesDirectory(canonicalSearchPath)) {
|
|
185982
|
+
break;
|
|
185938
185983
|
}
|
|
185939
185984
|
const parentPath = asNormalizedPath(getDirectoryPath(searchPath));
|
|
185940
185985
|
if (parentPath === searchPath) break;
|
|
185941
185986
|
searchPath = parentPath;
|
|
185942
|
-
|
|
185987
|
+
searchTsconfig = searchJsconfig = true;
|
|
185943
185988
|
} while (anySearchPathOk || isSearchPathInProjectRoot());
|
|
185944
185989
|
return void 0;
|
|
185945
185990
|
}
|
|
@@ -185962,8 +186007,19 @@ var _ProjectService = class _ProjectService {
|
|
|
185962
186007
|
/** Caches the configFilename for script info or ancestor of open script info */
|
|
185963
186008
|
setConfigFileNameForFileInCache(info, configFileName) {
|
|
185964
186009
|
if (!this.openFiles.has(info.path)) return;
|
|
185965
|
-
|
|
185966
|
-
|
|
186010
|
+
const config = configFileName || false;
|
|
186011
|
+
if (!isAncestorConfigFileInfo(info)) {
|
|
186012
|
+
this.configFileForOpenFiles.set(info.path, config);
|
|
186013
|
+
} else {
|
|
186014
|
+
let configFileForOpenFile = this.configFileForOpenFiles.get(info.path);
|
|
186015
|
+
if (!configFileForOpenFile || isString(configFileForOpenFile)) {
|
|
186016
|
+
this.configFileForOpenFiles.set(
|
|
186017
|
+
info.path,
|
|
186018
|
+
configFileForOpenFile = (/* @__PURE__ */ new Map()).set(false, configFileForOpenFile)
|
|
186019
|
+
);
|
|
186020
|
+
}
|
|
186021
|
+
configFileForOpenFile.set(info.fileName, config);
|
|
186022
|
+
}
|
|
185967
186023
|
}
|
|
185968
186024
|
/**
|
|
185969
186025
|
* This function tries to search for a tsconfig.json for the given file.
|
|
@@ -187340,7 +187396,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187340
187396
|
seenProjects
|
|
187341
187397
|
};
|
|
187342
187398
|
function tryFindDefaultConfiguredProject(project) {
|
|
187343
|
-
return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project);
|
|
187399
|
+
return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project) ?? tryFindDefaultConfiguredProjectFromAncestor(project);
|
|
187344
187400
|
}
|
|
187345
187401
|
function isDefaultProject(project) {
|
|
187346
187402
|
if (!tryAddToSet(seenProjects, project)) return;
|
|
@@ -187363,6 +187419,20 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187363
187419
|
reloadedProjects
|
|
187364
187420
|
);
|
|
187365
187421
|
}
|
|
187422
|
+
function tryFindDefaultConfiguredProjectFromAncestor(project) {
|
|
187423
|
+
return forEachAncestorProject(
|
|
187424
|
+
// If not in referenced projects, try ancestors and its references
|
|
187425
|
+
info,
|
|
187426
|
+
project,
|
|
187427
|
+
tryFindDefaultConfiguredProject,
|
|
187428
|
+
kind,
|
|
187429
|
+
`Creating possible configured project for ${info.fileName} to open`,
|
|
187430
|
+
allowDeferredClosed,
|
|
187431
|
+
reloadedProjects,
|
|
187432
|
+
/*searchOnlyPotentialSolution*/
|
|
187433
|
+
false
|
|
187434
|
+
);
|
|
187435
|
+
}
|
|
187366
187436
|
}
|
|
187367
187437
|
tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, kind, reloadedProjects, delayReloadedConfiguredProjects) {
|
|
187368
187438
|
const allowDeferredClosed = kind === 0 /* Find */;
|
|
@@ -187385,6 +187455,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
187385
187455
|
`Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`,
|
|
187386
187456
|
allowDeferredClosed,
|
|
187387
187457
|
reloadedProjects,
|
|
187458
|
+
/*searchOnlyPotentialSolution*/
|
|
187459
|
+
true,
|
|
187388
187460
|
delayReloadedConfiguredProjects
|
|
187389
187461
|
);
|
|
187390
187462
|
}
|
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.
|
|
5
|
+
"version": "5.6.0-pr-57196-3",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|