@typescript-deploys/pr-build 5.1.0-pr-50951-7 → 5.1.0-pr-53406-2
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 +24 -31
- package/lib/tsserver.js +24 -31
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +24 -31
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +24 -31
- package/lib/typingsInstaller.js +18 -28
- package/package.json +2 -2
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 = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230321`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -10242,36 +10242,32 @@ function getModifiers(node) {
|
|
|
10242
10242
|
return filter(node.modifiers, isModifier);
|
|
10243
10243
|
}
|
|
10244
10244
|
}
|
|
10245
|
-
function getJSDocParameterTagsWorker(
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
const i = signatureDeclaration.parameters.indexOf(declaration);
|
|
10258
|
-
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
10259
|
-
if (i < length(jsDocParameterTags)) {
|
|
10260
|
-
return [jsDocParameterTags[i]];
|
|
10245
|
+
function getJSDocParameterTagsWorker(param, noCache) {
|
|
10246
|
+
if (param.name) {
|
|
10247
|
+
if (isIdentifier(param.name)) {
|
|
10248
|
+
const name = param.name.escapedText;
|
|
10249
|
+
return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name);
|
|
10250
|
+
} else {
|
|
10251
|
+
const i = param.parent.parameters.indexOf(param);
|
|
10252
|
+
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
10253
|
+
const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag);
|
|
10254
|
+
if (i < paramTags.length) {
|
|
10255
|
+
return [paramTags[i]];
|
|
10256
|
+
}
|
|
10261
10257
|
}
|
|
10262
10258
|
}
|
|
10263
10259
|
return emptyArray;
|
|
10264
10260
|
}
|
|
10265
|
-
function getJSDocParameterTags(
|
|
10261
|
+
function getJSDocParameterTags(param) {
|
|
10266
10262
|
return getJSDocParameterTagsWorker(
|
|
10267
|
-
|
|
10263
|
+
param,
|
|
10268
10264
|
/*noCache*/
|
|
10269
10265
|
false
|
|
10270
10266
|
);
|
|
10271
10267
|
}
|
|
10272
|
-
function getJSDocParameterTagsNoCache(
|
|
10268
|
+
function getJSDocParameterTagsNoCache(param) {
|
|
10273
10269
|
return getJSDocParameterTagsWorker(
|
|
10274
|
-
|
|
10270
|
+
param,
|
|
10275
10271
|
/*noCache*/
|
|
10276
10272
|
true
|
|
10277
10273
|
);
|
|
@@ -10378,7 +10374,7 @@ function getJSDocTypeTag(node) {
|
|
|
10378
10374
|
}
|
|
10379
10375
|
function getJSDocType(node) {
|
|
10380
10376
|
let tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
10381
|
-
if (!tag &&
|
|
10377
|
+
if (!tag && isParameter(node)) {
|
|
10382
10378
|
tag = find(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression);
|
|
10383
10379
|
}
|
|
10384
10380
|
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
@@ -13699,7 +13695,7 @@ function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
|
13699
13695
|
if (hasJSDocNodes(node)) {
|
|
13700
13696
|
result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc)));
|
|
13701
13697
|
}
|
|
13702
|
-
if (node.kind === 167 /* Parameter */
|
|
13698
|
+
if (node.kind === 167 /* Parameter */) {
|
|
13703
13699
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
13704
13700
|
break;
|
|
13705
13701
|
}
|
|
@@ -47196,8 +47192,11 @@ function createTypeChecker(host) {
|
|
|
47196
47192
|
}
|
|
47197
47193
|
return typeToTypeNodeHelper(type2, context);
|
|
47198
47194
|
}
|
|
47195
|
+
function isMappedTypeHomomorphic(type2) {
|
|
47196
|
+
return !!getHomomorphicTypeVariable(type2);
|
|
47197
|
+
}
|
|
47199
47198
|
function isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) {
|
|
47200
|
-
return
|
|
47199
|
+
return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2);
|
|
47201
47200
|
}
|
|
47202
47201
|
function createMappedTypeNodeFromType(type2) {
|
|
47203
47202
|
Debug.assert(!!(type2.flags & 524288 /* Object */));
|
|
@@ -50647,12 +50646,6 @@ function createTypeChecker(host) {
|
|
|
50647
50646
|
}
|
|
50648
50647
|
function getTypeForBindingElement(declaration) {
|
|
50649
50648
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
50650
|
-
if (isInJSFile(declaration) && isParameterDeclaration(declaration)) {
|
|
50651
|
-
const type = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
50652
|
-
if (type) {
|
|
50653
|
-
return type;
|
|
50654
|
-
}
|
|
50655
|
-
}
|
|
50656
50649
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
50657
50650
|
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
|
|
50658
50651
|
}
|
|
@@ -55802,7 +55795,7 @@ function createTypeChecker(host) {
|
|
|
55802
55795
|
}
|
|
55803
55796
|
}
|
|
55804
55797
|
function removeStringLiteralsMatchedByTemplateLiterals(types) {
|
|
55805
|
-
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
|
|
55798
|
+
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && !some(t.types, (t2) => !!(t2.flags & 2097152 /* Intersection */)));
|
|
55806
55799
|
if (templates.length) {
|
|
55807
55800
|
let i = types.length;
|
|
55808
55801
|
while (i > 0) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2286
2286
|
|
|
2287
2287
|
// src/compiler/corePublic.ts
|
|
2288
2288
|
var versionMajorMinor = "5.1";
|
|
2289
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20230321`;
|
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -13832,36 +13832,32 @@ function getModifiers(node) {
|
|
|
13832
13832
|
return filter(node.modifiers, isModifier);
|
|
13833
13833
|
}
|
|
13834
13834
|
}
|
|
13835
|
-
function getJSDocParameterTagsWorker(
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
|
|
13839
|
-
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
const i = signatureDeclaration.parameters.indexOf(declaration);
|
|
13848
|
-
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
13849
|
-
if (i < length(jsDocParameterTags)) {
|
|
13850
|
-
return [jsDocParameterTags[i]];
|
|
13835
|
+
function getJSDocParameterTagsWorker(param, noCache) {
|
|
13836
|
+
if (param.name) {
|
|
13837
|
+
if (isIdentifier(param.name)) {
|
|
13838
|
+
const name = param.name.escapedText;
|
|
13839
|
+
return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name);
|
|
13840
|
+
} else {
|
|
13841
|
+
const i = param.parent.parameters.indexOf(param);
|
|
13842
|
+
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
13843
|
+
const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag);
|
|
13844
|
+
if (i < paramTags.length) {
|
|
13845
|
+
return [paramTags[i]];
|
|
13846
|
+
}
|
|
13851
13847
|
}
|
|
13852
13848
|
}
|
|
13853
13849
|
return emptyArray;
|
|
13854
13850
|
}
|
|
13855
|
-
function getJSDocParameterTags(
|
|
13851
|
+
function getJSDocParameterTags(param) {
|
|
13856
13852
|
return getJSDocParameterTagsWorker(
|
|
13857
|
-
|
|
13853
|
+
param,
|
|
13858
13854
|
/*noCache*/
|
|
13859
13855
|
false
|
|
13860
13856
|
);
|
|
13861
13857
|
}
|
|
13862
|
-
function getJSDocParameterTagsNoCache(
|
|
13858
|
+
function getJSDocParameterTagsNoCache(param) {
|
|
13863
13859
|
return getJSDocParameterTagsWorker(
|
|
13864
|
-
|
|
13860
|
+
param,
|
|
13865
13861
|
/*noCache*/
|
|
13866
13862
|
true
|
|
13867
13863
|
);
|
|
@@ -13983,7 +13979,7 @@ function getJSDocTypeTag(node) {
|
|
|
13983
13979
|
}
|
|
13984
13980
|
function getJSDocType(node) {
|
|
13985
13981
|
let tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
13986
|
-
if (!tag &&
|
|
13982
|
+
if (!tag && isParameter(node)) {
|
|
13987
13983
|
tag = find(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression);
|
|
13988
13984
|
}
|
|
13989
13985
|
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
@@ -17520,7 +17516,7 @@ function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
|
17520
17516
|
if (hasJSDocNodes(node)) {
|
|
17521
17517
|
result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc)));
|
|
17522
17518
|
}
|
|
17523
|
-
if (node.kind === 167 /* Parameter */
|
|
17519
|
+
if (node.kind === 167 /* Parameter */) {
|
|
17524
17520
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
17525
17521
|
break;
|
|
17526
17522
|
}
|
|
@@ -51823,8 +51819,11 @@ function createTypeChecker(host) {
|
|
|
51823
51819
|
}
|
|
51824
51820
|
return typeToTypeNodeHelper(type2, context);
|
|
51825
51821
|
}
|
|
51822
|
+
function isMappedTypeHomomorphic(type2) {
|
|
51823
|
+
return !!getHomomorphicTypeVariable(type2);
|
|
51824
|
+
}
|
|
51826
51825
|
function isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) {
|
|
51827
|
-
return
|
|
51826
|
+
return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2);
|
|
51828
51827
|
}
|
|
51829
51828
|
function createMappedTypeNodeFromType(type2) {
|
|
51830
51829
|
Debug.assert(!!(type2.flags & 524288 /* Object */));
|
|
@@ -55274,12 +55273,6 @@ function createTypeChecker(host) {
|
|
|
55274
55273
|
}
|
|
55275
55274
|
function getTypeForBindingElement(declaration) {
|
|
55276
55275
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
55277
|
-
if (isInJSFile(declaration) && isParameterDeclaration(declaration)) {
|
|
55278
|
-
const type = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
55279
|
-
if (type) {
|
|
55280
|
-
return type;
|
|
55281
|
-
}
|
|
55282
|
-
}
|
|
55283
55276
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
55284
55277
|
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
|
|
55285
55278
|
}
|
|
@@ -60429,7 +60422,7 @@ function createTypeChecker(host) {
|
|
|
60429
60422
|
}
|
|
60430
60423
|
}
|
|
60431
60424
|
function removeStringLiteralsMatchedByTemplateLiterals(types) {
|
|
60432
|
-
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
|
|
60425
|
+
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && !some(t.types, (t2) => !!(t2.flags & 2097152 /* Intersection */)));
|
|
60433
60426
|
if (templates.length) {
|
|
60434
60427
|
let i = types.length;
|
|
60435
60428
|
while (i > 0) {
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -8518,7 +8518,7 @@ declare namespace ts {
|
|
|
8518
8518
|
*
|
|
8519
8519
|
* For binding patterns, parameter tags are matched by position.
|
|
8520
8520
|
*/
|
|
8521
|
-
function getJSDocParameterTags(
|
|
8521
|
+
function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[];
|
|
8522
8522
|
/**
|
|
8523
8523
|
* Gets the JSDoc type parameter tags for the node if present.
|
|
8524
8524
|
*
|
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 = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230321`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -11662,36 +11662,32 @@ ${lanes.join("\n")}
|
|
|
11662
11662
|
return filter(node.modifiers, isModifier);
|
|
11663
11663
|
}
|
|
11664
11664
|
}
|
|
11665
|
-
function getJSDocParameterTagsWorker(
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
const i = signatureDeclaration.parameters.indexOf(declaration);
|
|
11678
|
-
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
11679
|
-
if (i < length(jsDocParameterTags)) {
|
|
11680
|
-
return [jsDocParameterTags[i]];
|
|
11665
|
+
function getJSDocParameterTagsWorker(param, noCache) {
|
|
11666
|
+
if (param.name) {
|
|
11667
|
+
if (isIdentifier(param.name)) {
|
|
11668
|
+
const name = param.name.escapedText;
|
|
11669
|
+
return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name);
|
|
11670
|
+
} else {
|
|
11671
|
+
const i = param.parent.parameters.indexOf(param);
|
|
11672
|
+
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
11673
|
+
const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag);
|
|
11674
|
+
if (i < paramTags.length) {
|
|
11675
|
+
return [paramTags[i]];
|
|
11676
|
+
}
|
|
11681
11677
|
}
|
|
11682
11678
|
}
|
|
11683
11679
|
return emptyArray;
|
|
11684
11680
|
}
|
|
11685
|
-
function getJSDocParameterTags(
|
|
11681
|
+
function getJSDocParameterTags(param) {
|
|
11686
11682
|
return getJSDocParameterTagsWorker(
|
|
11687
|
-
|
|
11683
|
+
param,
|
|
11688
11684
|
/*noCache*/
|
|
11689
11685
|
false
|
|
11690
11686
|
);
|
|
11691
11687
|
}
|
|
11692
|
-
function getJSDocParameterTagsNoCache(
|
|
11688
|
+
function getJSDocParameterTagsNoCache(param) {
|
|
11693
11689
|
return getJSDocParameterTagsWorker(
|
|
11694
|
-
|
|
11690
|
+
param,
|
|
11695
11691
|
/*noCache*/
|
|
11696
11692
|
true
|
|
11697
11693
|
);
|
|
@@ -11813,7 +11809,7 @@ ${lanes.join("\n")}
|
|
|
11813
11809
|
}
|
|
11814
11810
|
function getJSDocType(node) {
|
|
11815
11811
|
let tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
11816
|
-
if (!tag &&
|
|
11812
|
+
if (!tag && isParameter(node)) {
|
|
11817
11813
|
tag = find(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression);
|
|
11818
11814
|
}
|
|
11819
11815
|
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
@@ -15342,7 +15338,7 @@ ${lanes.join("\n")}
|
|
|
15342
15338
|
if (hasJSDocNodes(node)) {
|
|
15343
15339
|
result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc)));
|
|
15344
15340
|
}
|
|
15345
|
-
if (node.kind === 167 /* Parameter */
|
|
15341
|
+
if (node.kind === 167 /* Parameter */) {
|
|
15346
15342
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
15347
15343
|
break;
|
|
15348
15344
|
}
|
|
@@ -49631,8 +49627,11 @@ ${lanes.join("\n")}
|
|
|
49631
49627
|
}
|
|
49632
49628
|
return typeToTypeNodeHelper(type2, context);
|
|
49633
49629
|
}
|
|
49630
|
+
function isMappedTypeHomomorphic(type2) {
|
|
49631
|
+
return !!getHomomorphicTypeVariable(type2);
|
|
49632
|
+
}
|
|
49634
49633
|
function isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) {
|
|
49635
|
-
return
|
|
49634
|
+
return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2);
|
|
49636
49635
|
}
|
|
49637
49636
|
function createMappedTypeNodeFromType(type2) {
|
|
49638
49637
|
Debug.assert(!!(type2.flags & 524288 /* Object */));
|
|
@@ -53082,12 +53081,6 @@ ${lanes.join("\n")}
|
|
|
53082
53081
|
}
|
|
53083
53082
|
function getTypeForBindingElement(declaration) {
|
|
53084
53083
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
53085
|
-
if (isInJSFile(declaration) && isParameterDeclaration(declaration)) {
|
|
53086
|
-
const type = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
53087
|
-
if (type) {
|
|
53088
|
-
return type;
|
|
53089
|
-
}
|
|
53090
|
-
}
|
|
53091
53084
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
53092
53085
|
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
|
|
53093
53086
|
}
|
|
@@ -58237,7 +58230,7 @@ ${lanes.join("\n")}
|
|
|
58237
58230
|
}
|
|
58238
58231
|
}
|
|
58239
58232
|
function removeStringLiteralsMatchedByTemplateLiterals(types) {
|
|
58240
|
-
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
|
|
58233
|
+
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && !some(t.types, (t2) => !!(t2.flags & 2097152 /* Intersection */)));
|
|
58241
58234
|
if (templates.length) {
|
|
58242
58235
|
let i = types.length;
|
|
58243
58236
|
while (i > 0) {
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4575,7 +4575,7 @@ declare namespace ts {
|
|
|
4575
4575
|
*
|
|
4576
4576
|
* For binding patterns, parameter tags are matched by position.
|
|
4577
4577
|
*/
|
|
4578
|
-
function getJSDocParameterTags(
|
|
4578
|
+
function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[];
|
|
4579
4579
|
/**
|
|
4580
4580
|
* Gets the JSDoc type parameter tags for the node if present.
|
|
4581
4581
|
*
|
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 = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230321`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -11662,36 +11662,32 @@ ${lanes.join("\n")}
|
|
|
11662
11662
|
return filter(node.modifiers, isModifier);
|
|
11663
11663
|
}
|
|
11664
11664
|
}
|
|
11665
|
-
function getJSDocParameterTagsWorker(
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
const i = signatureDeclaration.parameters.indexOf(declaration);
|
|
11678
|
-
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
11679
|
-
if (i < length(jsDocParameterTags)) {
|
|
11680
|
-
return [jsDocParameterTags[i]];
|
|
11665
|
+
function getJSDocParameterTagsWorker(param, noCache) {
|
|
11666
|
+
if (param.name) {
|
|
11667
|
+
if (isIdentifier(param.name)) {
|
|
11668
|
+
const name = param.name.escapedText;
|
|
11669
|
+
return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name);
|
|
11670
|
+
} else {
|
|
11671
|
+
const i = param.parent.parameters.indexOf(param);
|
|
11672
|
+
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
11673
|
+
const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag);
|
|
11674
|
+
if (i < paramTags.length) {
|
|
11675
|
+
return [paramTags[i]];
|
|
11676
|
+
}
|
|
11681
11677
|
}
|
|
11682
11678
|
}
|
|
11683
11679
|
return emptyArray;
|
|
11684
11680
|
}
|
|
11685
|
-
function getJSDocParameterTags(
|
|
11681
|
+
function getJSDocParameterTags(param) {
|
|
11686
11682
|
return getJSDocParameterTagsWorker(
|
|
11687
|
-
|
|
11683
|
+
param,
|
|
11688
11684
|
/*noCache*/
|
|
11689
11685
|
false
|
|
11690
11686
|
);
|
|
11691
11687
|
}
|
|
11692
|
-
function getJSDocParameterTagsNoCache(
|
|
11688
|
+
function getJSDocParameterTagsNoCache(param) {
|
|
11693
11689
|
return getJSDocParameterTagsWorker(
|
|
11694
|
-
|
|
11690
|
+
param,
|
|
11695
11691
|
/*noCache*/
|
|
11696
11692
|
true
|
|
11697
11693
|
);
|
|
@@ -11813,7 +11809,7 @@ ${lanes.join("\n")}
|
|
|
11813
11809
|
}
|
|
11814
11810
|
function getJSDocType(node) {
|
|
11815
11811
|
let tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
|
11816
|
-
if (!tag &&
|
|
11812
|
+
if (!tag && isParameter(node)) {
|
|
11817
11813
|
tag = find(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression);
|
|
11818
11814
|
}
|
|
11819
11815
|
return tag && tag.typeExpression && tag.typeExpression.type;
|
|
@@ -15342,7 +15338,7 @@ ${lanes.join("\n")}
|
|
|
15342
15338
|
if (hasJSDocNodes(node)) {
|
|
15343
15339
|
result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc)));
|
|
15344
15340
|
}
|
|
15345
|
-
if (node.kind === 167 /* Parameter */
|
|
15341
|
+
if (node.kind === 167 /* Parameter */) {
|
|
15346
15342
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
15347
15343
|
break;
|
|
15348
15344
|
}
|
|
@@ -49631,8 +49627,11 @@ ${lanes.join("\n")}
|
|
|
49631
49627
|
}
|
|
49632
49628
|
return typeToTypeNodeHelper(type2, context);
|
|
49633
49629
|
}
|
|
49630
|
+
function isMappedTypeHomomorphic(type2) {
|
|
49631
|
+
return !!getHomomorphicTypeVariable(type2);
|
|
49632
|
+
}
|
|
49634
49633
|
function isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) {
|
|
49635
|
-
return
|
|
49634
|
+
return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2);
|
|
49636
49635
|
}
|
|
49637
49636
|
function createMappedTypeNodeFromType(type2) {
|
|
49638
49637
|
Debug.assert(!!(type2.flags & 524288 /* Object */));
|
|
@@ -53082,12 +53081,6 @@ ${lanes.join("\n")}
|
|
|
53082
53081
|
}
|
|
53083
53082
|
function getTypeForBindingElement(declaration) {
|
|
53084
53083
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
53085
|
-
if (isInJSFile(declaration) && isParameterDeclaration(declaration)) {
|
|
53086
|
-
const type = tryGetTypeFromEffectiveTypeNode(declaration);
|
|
53087
|
-
if (type) {
|
|
53088
|
-
return type;
|
|
53089
|
-
}
|
|
53090
|
-
}
|
|
53091
53084
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
53092
53085
|
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
|
|
53093
53086
|
}
|
|
@@ -58237,7 +58230,7 @@ ${lanes.join("\n")}
|
|
|
58237
58230
|
}
|
|
58238
58231
|
}
|
|
58239
58232
|
function removeStringLiteralsMatchedByTemplateLiterals(types) {
|
|
58240
|
-
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
|
|
58233
|
+
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && !some(t.types, (t2) => !!(t2.flags & 2097152 /* Intersection */)));
|
|
58241
58234
|
if (templates.length) {
|
|
58242
58235
|
let i = types.length;
|
|
58243
58236
|
while (i > 0) {
|
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.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230321`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -9418,36 +9418,32 @@ function getModifiers(node) {
|
|
|
9418
9418
|
return filter(node.modifiers, isModifier);
|
|
9419
9419
|
}
|
|
9420
9420
|
}
|
|
9421
|
-
function getJSDocParameterTagsWorker(
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
const i = signatureDeclaration.parameters.indexOf(declaration);
|
|
9434
|
-
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
9435
|
-
if (i < length(jsDocParameterTags)) {
|
|
9436
|
-
return [jsDocParameterTags[i]];
|
|
9421
|
+
function getJSDocParameterTagsWorker(param, noCache) {
|
|
9422
|
+
if (param.name) {
|
|
9423
|
+
if (isIdentifier(param.name)) {
|
|
9424
|
+
const name = param.name.escapedText;
|
|
9425
|
+
return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name);
|
|
9426
|
+
} else {
|
|
9427
|
+
const i = param.parent.parameters.indexOf(param);
|
|
9428
|
+
Debug.assert(i > -1, "Parameters should always be in their parents' parameter list");
|
|
9429
|
+
const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag);
|
|
9430
|
+
if (i < paramTags.length) {
|
|
9431
|
+
return [paramTags[i]];
|
|
9432
|
+
}
|
|
9437
9433
|
}
|
|
9438
9434
|
}
|
|
9439
9435
|
return emptyArray;
|
|
9440
9436
|
}
|
|
9441
|
-
function getJSDocParameterTags(
|
|
9437
|
+
function getJSDocParameterTags(param) {
|
|
9442
9438
|
return getJSDocParameterTagsWorker(
|
|
9443
|
-
|
|
9439
|
+
param,
|
|
9444
9440
|
/*noCache*/
|
|
9445
9441
|
false
|
|
9446
9442
|
);
|
|
9447
9443
|
}
|
|
9448
|
-
function getJSDocParameterTagsNoCache(
|
|
9444
|
+
function getJSDocParameterTagsNoCache(param) {
|
|
9449
9445
|
return getJSDocParameterTagsWorker(
|
|
9450
|
-
|
|
9446
|
+
param,
|
|
9451
9447
|
/*noCache*/
|
|
9452
9448
|
true
|
|
9453
9449
|
);
|
|
@@ -10459,7 +10455,7 @@ function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
|
10459
10455
|
if (hasJSDocNodes(node)) {
|
|
10460
10456
|
result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc)));
|
|
10461
10457
|
}
|
|
10462
|
-
if (node.kind === 167 /* Parameter */
|
|
10458
|
+
if (node.kind === 167 /* Parameter */) {
|
|
10463
10459
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
10464
10460
|
break;
|
|
10465
10461
|
}
|
|
@@ -10520,12 +10516,6 @@ function isDynamicName(name) {
|
|
|
10520
10516
|
function getTextOfIdentifierOrLiteral(node) {
|
|
10521
10517
|
return isMemberName(node) ? idText(node) : node.text;
|
|
10522
10518
|
}
|
|
10523
|
-
function getRootDeclaration(node) {
|
|
10524
|
-
while (node.kind === 206 /* BindingElement */) {
|
|
10525
|
-
node = node.parent.parent;
|
|
10526
|
-
}
|
|
10527
|
-
return node;
|
|
10528
|
-
}
|
|
10529
10519
|
function nodeIsSynthesized(range) {
|
|
10530
10520
|
return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end);
|
|
10531
10521
|
}
|
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.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-53406-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "14.21.1",
|
|
115
115
|
"npm": "8.19.3"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "1a0ad02b458b0588f22021304e4bcdce4c82f1f5"
|
|
118
118
|
}
|