@typescript-deploys/pr-build 5.1.0-pr-53729-10 → 5.1.0-pr-53489-15
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.es2022.intl.d.ts +9 -0
- package/lib/tsc.js +29 -1
- package/lib/tsserver.js +38 -6
- package/lib/tsserverlibrary.js +38 -6
- package/lib/typescript.js +38 -6
- package/package.json +2 -2
package/lib/lib.es2022.intl.d.ts
CHANGED
|
@@ -106,4 +106,13 @@ declare namespace Intl {
|
|
|
106
106
|
*/
|
|
107
107
|
supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[];
|
|
108
108
|
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation.
|
|
112
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf)
|
|
113
|
+
*
|
|
114
|
+
* @param key A string indicating the category of values to return.
|
|
115
|
+
* @returns A sorted array of the supported values.
|
|
116
|
+
*/
|
|
117
|
+
function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[];
|
|
109
118
|
}
|
package/lib/tsc.js
CHANGED
|
@@ -54064,7 +54064,35 @@ function createTypeChecker(host) {
|
|
|
54064
54064
|
return emptyArray;
|
|
54065
54065
|
}
|
|
54066
54066
|
function getSignaturesOfType(type, kind) {
|
|
54067
|
-
|
|
54067
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
54068
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
54069
|
+
if (type.arrayFallbackSignatures) {
|
|
54070
|
+
return type.arrayFallbackSignatures;
|
|
54071
|
+
}
|
|
54072
|
+
let memberName;
|
|
54073
|
+
if (everyType(type, (t) => {
|
|
54074
|
+
var _a2;
|
|
54075
|
+
return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
54076
|
+
})) {
|
|
54077
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
54078
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
54079
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
54080
|
+
}
|
|
54081
|
+
type.arrayFallbackSignatures = result;
|
|
54082
|
+
}
|
|
54083
|
+
return result;
|
|
54084
|
+
}
|
|
54085
|
+
function isArrayOrTupleSymbol(symbol) {
|
|
54086
|
+
if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) {
|
|
54087
|
+
return false;
|
|
54088
|
+
}
|
|
54089
|
+
return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
54090
|
+
}
|
|
54091
|
+
function isReadonlyArraySymbol(symbol) {
|
|
54092
|
+
if (!symbol || !globalReadonlyArrayType.symbol) {
|
|
54093
|
+
return false;
|
|
54094
|
+
}
|
|
54095
|
+
return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
54068
54096
|
}
|
|
54069
54097
|
function findIndexInfo(indexInfos, keyType) {
|
|
54070
54098
|
return find(indexInfos, (info) => info.keyType === keyType);
|
package/lib/tsserver.js
CHANGED
|
@@ -58714,7 +58714,35 @@ function createTypeChecker(host) {
|
|
|
58714
58714
|
return emptyArray;
|
|
58715
58715
|
}
|
|
58716
58716
|
function getSignaturesOfType(type, kind) {
|
|
58717
|
-
|
|
58717
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
58718
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
58719
|
+
if (type.arrayFallbackSignatures) {
|
|
58720
|
+
return type.arrayFallbackSignatures;
|
|
58721
|
+
}
|
|
58722
|
+
let memberName;
|
|
58723
|
+
if (everyType(type, (t) => {
|
|
58724
|
+
var _a2;
|
|
58725
|
+
return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
58726
|
+
})) {
|
|
58727
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
58728
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
58729
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
58730
|
+
}
|
|
58731
|
+
type.arrayFallbackSignatures = result;
|
|
58732
|
+
}
|
|
58733
|
+
return result;
|
|
58734
|
+
}
|
|
58735
|
+
function isArrayOrTupleSymbol(symbol) {
|
|
58736
|
+
if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) {
|
|
58737
|
+
return false;
|
|
58738
|
+
}
|
|
58739
|
+
return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
58740
|
+
}
|
|
58741
|
+
function isReadonlyArraySymbol(symbol) {
|
|
58742
|
+
if (!symbol || !globalReadonlyArrayType.symbol) {
|
|
58743
|
+
return false;
|
|
58744
|
+
}
|
|
58745
|
+
return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
58718
58746
|
}
|
|
58719
58747
|
function findIndexInfo(indexInfos, keyType) {
|
|
58720
58748
|
return find(indexInfos, (info) => info.keyType === keyType);
|
|
@@ -128909,7 +128937,13 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) {
|
|
|
128909
128937
|
sourceFile,
|
|
128910
128938
|
n.kind
|
|
128911
128939
|
);
|
|
128912
|
-
|
|
128940
|
+
if (candidate2) {
|
|
128941
|
+
if (!excludeJsdoc && isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
|
128942
|
+
return find2(candidate2);
|
|
128943
|
+
}
|
|
128944
|
+
return findRightmostToken(candidate2, sourceFile);
|
|
128945
|
+
}
|
|
128946
|
+
return void 0;
|
|
128913
128947
|
} else {
|
|
128914
128948
|
return find2(child);
|
|
128915
128949
|
}
|
|
@@ -156270,7 +156304,6 @@ function getReferenceAtPosition(sourceFile, position, program) {
|
|
|
156270
156304
|
return void 0;
|
|
156271
156305
|
}
|
|
156272
156306
|
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
|
|
156273
|
-
var _a2;
|
|
156274
156307
|
const node = getTouchingPropertyName(sourceFile, position);
|
|
156275
156308
|
if (node === sourceFile) {
|
|
156276
156309
|
return void 0;
|
|
@@ -156295,9 +156328,8 @@ function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
|
|
|
156295
156328
|
const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node);
|
|
156296
156329
|
const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker);
|
|
156297
156330
|
const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution);
|
|
156298
|
-
const
|
|
156299
|
-
|
|
156300
|
-
return typeDefinitions.length ? [...singleTypeArgumentDefinition, ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
156331
|
+
const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution);
|
|
156332
|
+
return typeDefinitions.length ? typeDefinitions : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
156301
156333
|
}
|
|
156302
156334
|
function definitionFromType(type, checker, node, failedAliasResolution) {
|
|
156303
156335
|
return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution));
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -56515,7 +56515,35 @@ ${lanes.join("\n")}
|
|
|
56515
56515
|
return emptyArray;
|
|
56516
56516
|
}
|
|
56517
56517
|
function getSignaturesOfType(type, kind) {
|
|
56518
|
-
|
|
56518
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
56519
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
56520
|
+
if (type.arrayFallbackSignatures) {
|
|
56521
|
+
return type.arrayFallbackSignatures;
|
|
56522
|
+
}
|
|
56523
|
+
let memberName;
|
|
56524
|
+
if (everyType(type, (t) => {
|
|
56525
|
+
var _a2;
|
|
56526
|
+
return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
56527
|
+
})) {
|
|
56528
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
56529
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
56530
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
56531
|
+
}
|
|
56532
|
+
type.arrayFallbackSignatures = result;
|
|
56533
|
+
}
|
|
56534
|
+
return result;
|
|
56535
|
+
}
|
|
56536
|
+
function isArrayOrTupleSymbol(symbol) {
|
|
56537
|
+
if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) {
|
|
56538
|
+
return false;
|
|
56539
|
+
}
|
|
56540
|
+
return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
56541
|
+
}
|
|
56542
|
+
function isReadonlyArraySymbol(symbol) {
|
|
56543
|
+
if (!symbol || !globalReadonlyArrayType.symbol) {
|
|
56544
|
+
return false;
|
|
56545
|
+
}
|
|
56546
|
+
return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
56519
56547
|
}
|
|
56520
56548
|
function findIndexInfo(indexInfos, keyType) {
|
|
56521
56549
|
return find(indexInfos, (info) => info.keyType === keyType);
|
|
@@ -127221,7 +127249,13 @@ ${lanes.join("\n")}
|
|
|
127221
127249
|
sourceFile,
|
|
127222
127250
|
n.kind
|
|
127223
127251
|
);
|
|
127224
|
-
|
|
127252
|
+
if (candidate2) {
|
|
127253
|
+
if (!excludeJsdoc && isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
|
127254
|
+
return find2(candidate2);
|
|
127255
|
+
}
|
|
127256
|
+
return findRightmostToken(candidate2, sourceFile);
|
|
127257
|
+
}
|
|
127258
|
+
return void 0;
|
|
127225
127259
|
} else {
|
|
127226
127260
|
return find2(child);
|
|
127227
127261
|
}
|
|
@@ -155422,7 +155456,6 @@ ${lanes.join("\n")}
|
|
|
155422
155456
|
return void 0;
|
|
155423
155457
|
}
|
|
155424
155458
|
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
|
|
155425
|
-
var _a2;
|
|
155426
155459
|
const node = getTouchingPropertyName(sourceFile, position);
|
|
155427
155460
|
if (node === sourceFile) {
|
|
155428
155461
|
return void 0;
|
|
@@ -155447,9 +155480,8 @@ ${lanes.join("\n")}
|
|
|
155447
155480
|
const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node);
|
|
155448
155481
|
const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker);
|
|
155449
155482
|
const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution);
|
|
155450
|
-
const
|
|
155451
|
-
|
|
155452
|
-
return typeDefinitions.length ? [...singleTypeArgumentDefinition, ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
155483
|
+
const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution);
|
|
155484
|
+
return typeDefinitions.length ? typeDefinitions : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
155453
155485
|
}
|
|
155454
155486
|
function definitionFromType(type, checker, node, failedAliasResolution) {
|
|
155455
155487
|
return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution));
|
package/lib/typescript.js
CHANGED
|
@@ -56515,7 +56515,35 @@ ${lanes.join("\n")}
|
|
|
56515
56515
|
return emptyArray;
|
|
56516
56516
|
}
|
|
56517
56517
|
function getSignaturesOfType(type, kind) {
|
|
56518
|
-
|
|
56518
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
56519
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
56520
|
+
if (type.arrayFallbackSignatures) {
|
|
56521
|
+
return type.arrayFallbackSignatures;
|
|
56522
|
+
}
|
|
56523
|
+
let memberName;
|
|
56524
|
+
if (everyType(type, (t) => {
|
|
56525
|
+
var _a2;
|
|
56526
|
+
return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
56527
|
+
})) {
|
|
56528
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
56529
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
56530
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
56531
|
+
}
|
|
56532
|
+
type.arrayFallbackSignatures = result;
|
|
56533
|
+
}
|
|
56534
|
+
return result;
|
|
56535
|
+
}
|
|
56536
|
+
function isArrayOrTupleSymbol(symbol) {
|
|
56537
|
+
if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) {
|
|
56538
|
+
return false;
|
|
56539
|
+
}
|
|
56540
|
+
return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
56541
|
+
}
|
|
56542
|
+
function isReadonlyArraySymbol(symbol) {
|
|
56543
|
+
if (!symbol || !globalReadonlyArrayType.symbol) {
|
|
56544
|
+
return false;
|
|
56545
|
+
}
|
|
56546
|
+
return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
|
56519
56547
|
}
|
|
56520
56548
|
function findIndexInfo(indexInfos, keyType) {
|
|
56521
56549
|
return find(indexInfos, (info) => info.keyType === keyType);
|
|
@@ -127235,7 +127263,13 @@ ${lanes.join("\n")}
|
|
|
127235
127263
|
sourceFile,
|
|
127236
127264
|
n.kind
|
|
127237
127265
|
);
|
|
127238
|
-
|
|
127266
|
+
if (candidate2) {
|
|
127267
|
+
if (!excludeJsdoc && isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
|
127268
|
+
return find2(candidate2);
|
|
127269
|
+
}
|
|
127270
|
+
return findRightmostToken(candidate2, sourceFile);
|
|
127271
|
+
}
|
|
127272
|
+
return void 0;
|
|
127239
127273
|
} else {
|
|
127240
127274
|
return find2(child);
|
|
127241
127275
|
}
|
|
@@ -155436,7 +155470,6 @@ ${lanes.join("\n")}
|
|
|
155436
155470
|
return void 0;
|
|
155437
155471
|
}
|
|
155438
155472
|
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
|
|
155439
|
-
var _a2;
|
|
155440
155473
|
const node = getTouchingPropertyName(sourceFile, position);
|
|
155441
155474
|
if (node === sourceFile) {
|
|
155442
155475
|
return void 0;
|
|
@@ -155461,9 +155494,8 @@ ${lanes.join("\n")}
|
|
|
155461
155494
|
const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node);
|
|
155462
155495
|
const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker);
|
|
155463
155496
|
const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution);
|
|
155464
|
-
const
|
|
155465
|
-
|
|
155466
|
-
return typeDefinitions.length ? [...singleTypeArgumentDefinition, ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
155497
|
+
const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution);
|
|
155498
|
+
return typeDefinitions.length ? typeDefinitions : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
155467
155499
|
}
|
|
155468
155500
|
function definitionFromType(type, checker, node, failedAliasResolution) {
|
|
155469
155501
|
return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution));
|
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-53489-15",
|
|
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": "c8bb06f875118d1186d88f0ba8a98d03de76defe"
|
|
118
118
|
}
|