@typescript-deploys/pr-build 5.6.0-pr-59154-2 → 5.6.0-pr-59170-7
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 +20 -30
- package/lib/typescript.js +21 -44
- 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.6";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240708`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -12745,7 +12745,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
12745
12745
|
}
|
|
12746
12746
|
if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {
|
|
12747
12747
|
return skipTrivia(
|
|
12748
|
-
(sourceFile
|
|
12748
|
+
(sourceFile || getSourceFileOfNode(node)).text,
|
|
12749
12749
|
node.pos,
|
|
12750
12750
|
/*stopAfterLineBreak*/
|
|
12751
12751
|
false,
|
|
@@ -12757,14 +12757,13 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
12757
12757
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
12758
12758
|
}
|
|
12759
12759
|
if (node.kind === 352 /* SyntaxList */) {
|
|
12760
|
-
|
|
12761
|
-
const first2 = firstOrUndefined(getNodeChildren(node, sourceFile));
|
|
12760
|
+
const first2 = firstOrUndefined(getNodeChildren(node));
|
|
12762
12761
|
if (first2) {
|
|
12763
12762
|
return getTokenPosOfNode(first2, sourceFile, includeJsDoc);
|
|
12764
12763
|
}
|
|
12765
12764
|
}
|
|
12766
12765
|
return skipTrivia(
|
|
12767
|
-
(sourceFile
|
|
12766
|
+
(sourceFile || getSourceFileOfNode(node)).text,
|
|
12768
12767
|
node.pos,
|
|
12769
12768
|
/*stopAfterLineBreak*/
|
|
12770
12769
|
false,
|
|
@@ -23512,7 +23511,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
23512
23511
|
}
|
|
23513
23512
|
function createSyntaxList(children) {
|
|
23514
23513
|
const node = createBaseNode(352 /* SyntaxList */);
|
|
23515
|
-
node
|
|
23514
|
+
setNodeChildren(node, children);
|
|
23516
23515
|
return node;
|
|
23517
23516
|
}
|
|
23518
23517
|
function createNotEmittedStatement(original) {
|
|
@@ -26288,24 +26287,17 @@ function isJSDocImportTag(node) {
|
|
|
26288
26287
|
}
|
|
26289
26288
|
|
|
26290
26289
|
// src/compiler/factory/nodeChildren.ts
|
|
26291
|
-
var
|
|
26292
|
-
function getNodeChildren(node
|
|
26293
|
-
|
|
26294
|
-
|
|
26295
|
-
if (!isNodeKind(kind)) {
|
|
26296
|
-
return emptyArray;
|
|
26297
|
-
}
|
|
26298
|
-
if (kind === 352 /* SyntaxList */) {
|
|
26299
|
-
return node._children;
|
|
26300
|
-
}
|
|
26301
|
-
return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node);
|
|
26290
|
+
var nodeChildren = /* @__PURE__ */ new WeakMap();
|
|
26291
|
+
function getNodeChildren(node) {
|
|
26292
|
+
if (!isNodeKind(node.kind)) return emptyArray;
|
|
26293
|
+
return nodeChildren.get(node);
|
|
26302
26294
|
}
|
|
26303
|
-
function
|
|
26304
|
-
|
|
26305
|
-
|
|
26306
|
-
|
|
26307
|
-
|
|
26308
|
-
|
|
26295
|
+
function setNodeChildren(node, children) {
|
|
26296
|
+
nodeChildren.set(node, children);
|
|
26297
|
+
return children;
|
|
26298
|
+
}
|
|
26299
|
+
function unsetNodeChildren(node) {
|
|
26300
|
+
nodeChildren.delete(node);
|
|
26309
26301
|
}
|
|
26310
26302
|
|
|
26311
26303
|
// src/compiler/factory/utilities.ts
|
|
@@ -34930,7 +34922,7 @@ var IncrementalParser;
|
|
|
34930
34922
|
}
|
|
34931
34923
|
}
|
|
34932
34924
|
}
|
|
34933
|
-
function moveElementEntirelyPastChangeRange(element,
|
|
34925
|
+
function moveElementEntirelyPastChangeRange(element, isArray2, delta, oldText, newText, aggressiveChecks) {
|
|
34934
34926
|
if (isArray2) {
|
|
34935
34927
|
visitArray2(element);
|
|
34936
34928
|
} else {
|
|
@@ -34942,7 +34934,7 @@ var IncrementalParser;
|
|
|
34942
34934
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
34943
34935
|
text = oldText.substring(node.pos, node.end);
|
|
34944
34936
|
}
|
|
34945
|
-
unsetNodeChildren(node
|
|
34937
|
+
unsetNodeChildren(node);
|
|
34946
34938
|
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
|
34947
34939
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
34948
34940
|
Debug.assert(text === newText.substring(node.pos, node.end));
|
|
@@ -35016,7 +35008,6 @@ var IncrementalParser;
|
|
|
35016
35008
|
if (child.pos > changeRangeOldEnd) {
|
|
35017
35009
|
moveElementEntirelyPastChangeRange(
|
|
35018
35010
|
child,
|
|
35019
|
-
sourceFile,
|
|
35020
35011
|
/*isArray*/
|
|
35021
35012
|
false,
|
|
35022
35013
|
delta,
|
|
@@ -35029,7 +35020,7 @@ var IncrementalParser;
|
|
|
35029
35020
|
const fullEnd = child.end;
|
|
35030
35021
|
if (fullEnd >= changeStart) {
|
|
35031
35022
|
markAsIntersectingIncrementalChange(child);
|
|
35032
|
-
unsetNodeChildren(child
|
|
35023
|
+
unsetNodeChildren(child);
|
|
35033
35024
|
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
|
35034
35025
|
forEachChild(child, visitNode3, visitArray2);
|
|
35035
35026
|
if (hasJSDocNodes(child)) {
|
|
@@ -35047,7 +35038,6 @@ var IncrementalParser;
|
|
|
35047
35038
|
if (array.pos > changeRangeOldEnd) {
|
|
35048
35039
|
moveElementEntirelyPastChangeRange(
|
|
35049
35040
|
array,
|
|
35050
|
-
sourceFile,
|
|
35051
35041
|
/*isArray*/
|
|
35052
35042
|
true,
|
|
35053
35043
|
delta,
|
|
@@ -51433,8 +51423,8 @@ function createTypeChecker(host) {
|
|
|
51433
51423
|
const type = getReturnTypeOfSignature(signature);
|
|
51434
51424
|
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
|
51435
51425
|
const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
|
51436
|
-
if (annotation
|
|
51437
|
-
const result =
|
|
51426
|
+
if (annotation) {
|
|
51427
|
+
const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration);
|
|
51438
51428
|
if (result) {
|
|
51439
51429
|
return result;
|
|
51440
51430
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -2250,7 +2250,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2250
2250
|
|
|
2251
2251
|
// src/compiler/corePublic.ts
|
|
2252
2252
|
var versionMajorMinor = "5.6";
|
|
2253
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2253
|
+
var version = `${versionMajorMinor}.0-insiders.20240708`;
|
|
2254
2254
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2255
2255
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2256
2256
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -16357,7 +16357,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
16357
16357
|
}
|
|
16358
16358
|
if (isJSDocNode(node) || node.kind === 12 /* JsxText */) {
|
|
16359
16359
|
return skipTrivia(
|
|
16360
|
-
(sourceFile
|
|
16360
|
+
(sourceFile || getSourceFileOfNode(node)).text,
|
|
16361
16361
|
node.pos,
|
|
16362
16362
|
/*stopAfterLineBreak*/
|
|
16363
16363
|
false,
|
|
@@ -16369,14 +16369,13 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
|
|
|
16369
16369
|
return getTokenPosOfNode(node.jsDoc[0], sourceFile);
|
|
16370
16370
|
}
|
|
16371
16371
|
if (node.kind === 352 /* SyntaxList */) {
|
|
16372
|
-
|
|
16373
|
-
const first2 = firstOrUndefined(getNodeChildren(node, sourceFile));
|
|
16372
|
+
const first2 = firstOrUndefined(getNodeChildren(node));
|
|
16374
16373
|
if (first2) {
|
|
16375
16374
|
return getTokenPosOfNode(first2, sourceFile, includeJsDoc);
|
|
16376
16375
|
}
|
|
16377
16376
|
}
|
|
16378
16377
|
return skipTrivia(
|
|
16379
|
-
(sourceFile
|
|
16378
|
+
(sourceFile || getSourceFileOfNode(node)).text,
|
|
16380
16379
|
node.pos,
|
|
16381
16380
|
/*stopAfterLineBreak*/
|
|
16382
16381
|
false,
|
|
@@ -27607,7 +27606,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
27607
27606
|
}
|
|
27608
27607
|
function createSyntaxList3(children) {
|
|
27609
27608
|
const node = createBaseNode(352 /* SyntaxList */);
|
|
27610
|
-
node
|
|
27609
|
+
setNodeChildren(node, children);
|
|
27611
27610
|
return node;
|
|
27612
27611
|
}
|
|
27613
27612
|
function createNotEmittedStatement(original) {
|
|
@@ -30508,37 +30507,17 @@ function isSyntaxList(n) {
|
|
|
30508
30507
|
}
|
|
30509
30508
|
|
|
30510
30509
|
// src/compiler/factory/nodeChildren.ts
|
|
30511
|
-
var
|
|
30512
|
-
function getNodeChildren(node
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
if (!isNodeKind(kind)) {
|
|
30516
|
-
return emptyArray;
|
|
30517
|
-
}
|
|
30518
|
-
if (kind === 352 /* SyntaxList */) {
|
|
30519
|
-
return node._children;
|
|
30520
|
-
}
|
|
30521
|
-
return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node);
|
|
30510
|
+
var nodeChildren = /* @__PURE__ */ new WeakMap();
|
|
30511
|
+
function getNodeChildren(node) {
|
|
30512
|
+
if (!isNodeKind(node.kind)) return emptyArray;
|
|
30513
|
+
return nodeChildren.get(node);
|
|
30522
30514
|
}
|
|
30523
|
-
function setNodeChildren(node,
|
|
30524
|
-
|
|
30525
|
-
node._children = children;
|
|
30526
|
-
} else {
|
|
30527
|
-
let map2 = sourceFileToNodeChildren.get(sourceFile);
|
|
30528
|
-
if (map2 === void 0) {
|
|
30529
|
-
map2 = /* @__PURE__ */ new WeakMap();
|
|
30530
|
-
sourceFileToNodeChildren.set(sourceFile, map2);
|
|
30531
|
-
}
|
|
30532
|
-
map2.set(node, children);
|
|
30533
|
-
}
|
|
30515
|
+
function setNodeChildren(node, children) {
|
|
30516
|
+
nodeChildren.set(node, children);
|
|
30534
30517
|
return children;
|
|
30535
30518
|
}
|
|
30536
|
-
function unsetNodeChildren(node
|
|
30537
|
-
|
|
30538
|
-
if (node.kind === 352 /* SyntaxList */) {
|
|
30539
|
-
Debug.fail("Did not expect to unset the children of a SyntaxList.");
|
|
30540
|
-
}
|
|
30541
|
-
(_a = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a.delete(node);
|
|
30519
|
+
function unsetNodeChildren(node) {
|
|
30520
|
+
nodeChildren.delete(node);
|
|
30542
30521
|
}
|
|
30543
30522
|
|
|
30544
30523
|
// src/compiler/factory/utilities.ts
|
|
@@ -39182,7 +39161,7 @@ var IncrementalParser;
|
|
|
39182
39161
|
}
|
|
39183
39162
|
}
|
|
39184
39163
|
}
|
|
39185
|
-
function moveElementEntirelyPastChangeRange(element,
|
|
39164
|
+
function moveElementEntirelyPastChangeRange(element, isArray2, delta, oldText, newText, aggressiveChecks) {
|
|
39186
39165
|
if (isArray2) {
|
|
39187
39166
|
visitArray2(element);
|
|
39188
39167
|
} else {
|
|
@@ -39194,7 +39173,7 @@ var IncrementalParser;
|
|
|
39194
39173
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
39195
39174
|
text = oldText.substring(node.pos, node.end);
|
|
39196
39175
|
}
|
|
39197
|
-
unsetNodeChildren(node
|
|
39176
|
+
unsetNodeChildren(node);
|
|
39198
39177
|
setTextRangePosEnd(node, node.pos + delta, node.end + delta);
|
|
39199
39178
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
39200
39179
|
Debug.assert(text === newText.substring(node.pos, node.end));
|
|
@@ -39268,7 +39247,6 @@ var IncrementalParser;
|
|
|
39268
39247
|
if (child.pos > changeRangeOldEnd) {
|
|
39269
39248
|
moveElementEntirelyPastChangeRange(
|
|
39270
39249
|
child,
|
|
39271
|
-
sourceFile,
|
|
39272
39250
|
/*isArray*/
|
|
39273
39251
|
false,
|
|
39274
39252
|
delta,
|
|
@@ -39281,7 +39259,7 @@ var IncrementalParser;
|
|
|
39281
39259
|
const fullEnd = child.end;
|
|
39282
39260
|
if (fullEnd >= changeStart) {
|
|
39283
39261
|
markAsIntersectingIncrementalChange(child);
|
|
39284
|
-
unsetNodeChildren(child
|
|
39262
|
+
unsetNodeChildren(child);
|
|
39285
39263
|
adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
|
|
39286
39264
|
forEachChild(child, visitNode3, visitArray2);
|
|
39287
39265
|
if (hasJSDocNodes(child)) {
|
|
@@ -39299,7 +39277,6 @@ var IncrementalParser;
|
|
|
39299
39277
|
if (array.pos > changeRangeOldEnd) {
|
|
39300
39278
|
moveElementEntirelyPastChangeRange(
|
|
39301
39279
|
array,
|
|
39302
|
-
sourceFile,
|
|
39303
39280
|
/*isArray*/
|
|
39304
39281
|
true,
|
|
39305
39282
|
delta,
|
|
@@ -56034,8 +56011,8 @@ function createTypeChecker(host) {
|
|
|
56034
56011
|
const type = getReturnTypeOfSignature(signature);
|
|
56035
56012
|
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
|
|
56036
56013
|
const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
|
56037
|
-
if (annotation
|
|
56038
|
-
const result =
|
|
56014
|
+
if (annotation) {
|
|
56015
|
+
const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration);
|
|
56039
56016
|
if (result) {
|
|
56040
56017
|
return result;
|
|
56041
56018
|
}
|
|
@@ -148139,9 +148116,9 @@ var NodeObject = class {
|
|
|
148139
148116
|
getChildAt(index, sourceFile) {
|
|
148140
148117
|
return this.getChildren(sourceFile)[index];
|
|
148141
148118
|
}
|
|
148142
|
-
getChildren(sourceFile
|
|
148119
|
+
getChildren(sourceFile) {
|
|
148143
148120
|
this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine");
|
|
148144
|
-
return getNodeChildren(this
|
|
148121
|
+
return getNodeChildren(this) ?? setNodeChildren(this, createChildren(this, sourceFile));
|
|
148145
148122
|
}
|
|
148146
148123
|
getFirstToken(sourceFile) {
|
|
148147
148124
|
this.assertHasRealPosition();
|
|
@@ -148222,7 +148199,7 @@ function createSyntaxList(nodes, parent2) {
|
|
|
148222
148199
|
pos = node.end;
|
|
148223
148200
|
}
|
|
148224
148201
|
addSyntheticNodes(children, pos, nodes.end, parent2);
|
|
148225
|
-
list
|
|
148202
|
+
setNodeChildren(list, children);
|
|
148226
148203
|
return list;
|
|
148227
148204
|
}
|
|
148228
148205
|
var TokenOrIdentifierObject = class {
|
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.6.0-pr-
|
|
5
|
+
"version": "5.6.0-pr-59170-7",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|