@typescript-deploys/pr-build 5.4.0-pr-56939-8 → 5.4.0-pr-56902-8
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.es2018.intl.d.ts +16 -4
- package/lib/lib.es2020.bigint.d.ts +0 -1
- package/lib/lib.es2020.intl.d.ts +32 -7
- package/lib/lib.es2023.d.ts +1 -0
- package/lib/lib.es2023.intl.d.ts +52 -0
- package/lib/lib.es5.d.ts +28 -6
- package/lib/lib.esnext.intl.d.ts +1 -8
- package/lib/tsc.js +7 -11
- package/lib/tsserver.js +10 -13
- package/lib/typescript.js +10 -13
- package/lib/typingsInstaller.js +2 -1
- package/package.json +2 -2
package/lib/lib.es2018.intl.d.ts
CHANGED
|
@@ -55,10 +55,22 @@ declare namespace Intl {
|
|
|
55
55
|
|
|
56
56
|
const PluralRules: PluralRulesConstructor;
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
interface NumberFormatPartTypeRegistry {
|
|
59
|
+
literal: any;
|
|
60
|
+
nan: any;
|
|
61
|
+
infinity: any;
|
|
62
|
+
percent: any;
|
|
63
|
+
integer: any;
|
|
64
|
+
group: any;
|
|
65
|
+
decimal: any;
|
|
66
|
+
fraction: any;
|
|
67
|
+
plusSign: any;
|
|
68
|
+
minusSign: any;
|
|
69
|
+
percentSign: any;
|
|
70
|
+
currency: any;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
|
|
62
74
|
|
|
63
75
|
interface NumberFormatPart {
|
|
64
76
|
type: NumberFormatPartTypes;
|
package/lib/lib.es2020.intl.d.ts
CHANGED
|
@@ -241,24 +241,49 @@ declare namespace Intl {
|
|
|
241
241
|
): UnicodeBCP47LocaleIdentifier[];
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
+
interface NumberFormatOptionsStyleRegistry {
|
|
245
|
+
unit: any;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
249
|
+
narrowSymbol: any;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
interface NumberFormatOptionsSignDisplayRegistry {
|
|
253
|
+
auto: any;
|
|
254
|
+
never: any;
|
|
255
|
+
always: any;
|
|
256
|
+
exceptZero: any;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry;
|
|
260
|
+
|
|
244
261
|
interface NumberFormatOptions {
|
|
262
|
+
numberingSystem?: string | undefined;
|
|
245
263
|
compactDisplay?: "short" | "long" | undefined;
|
|
246
264
|
notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
|
|
247
|
-
signDisplay?:
|
|
265
|
+
signDisplay?: NumberFormatOptionsSignDisplay | undefined;
|
|
248
266
|
unit?: string | undefined;
|
|
249
267
|
unitDisplay?: "short" | "long" | "narrow" | undefined;
|
|
250
|
-
|
|
251
|
-
currencySign?: string | undefined;
|
|
268
|
+
currencySign?: "standard" | "accounting" | undefined;
|
|
252
269
|
}
|
|
253
270
|
|
|
254
271
|
interface ResolvedNumberFormatOptions {
|
|
255
272
|
compactDisplay?: "short" | "long";
|
|
256
|
-
notation
|
|
257
|
-
signDisplay
|
|
273
|
+
notation: "standard" | "scientific" | "engineering" | "compact";
|
|
274
|
+
signDisplay: NumberFormatOptionsSignDisplay;
|
|
258
275
|
unit?: string;
|
|
259
276
|
unitDisplay?: "short" | "long" | "narrow";
|
|
260
|
-
|
|
261
|
-
|
|
277
|
+
currencySign?: "standard" | "accounting";
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
interface NumberFormatPartTypeRegistry {
|
|
281
|
+
compact: any;
|
|
282
|
+
exponentInteger: any;
|
|
283
|
+
exponentMinusSign: any;
|
|
284
|
+
exponentSeparator: any;
|
|
285
|
+
unit: any;
|
|
286
|
+
unknown: any;
|
|
262
287
|
}
|
|
263
288
|
|
|
264
289
|
interface DateTimeFormatOptions {
|
package/lib/lib.es2023.d.ts
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
declare namespace Intl {
|
|
20
|
+
interface NumberFormatOptionsUseGroupingRegistry {
|
|
21
|
+
min2: any;
|
|
22
|
+
auto: any;
|
|
23
|
+
always: any;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface NumberFormatOptionsSignDisplayRegistry {
|
|
27
|
+
negative: any;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface NumberFormatOptions {
|
|
31
|
+
roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined;
|
|
32
|
+
roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined;
|
|
33
|
+
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
|
|
34
|
+
trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface ResolvedNumberFormatOptions {
|
|
38
|
+
roundingPriority: "auto" | "morePrecision" | "lessPrecision";
|
|
39
|
+
roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
|
|
40
|
+
roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000;
|
|
41
|
+
trailingZeroDisplay: "auto" | "stripIfInteger";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface NumberRangeFormatPart extends NumberFormatPart {
|
|
45
|
+
source: "startRange" | "endRange" | "shared";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface NumberFormat {
|
|
49
|
+
formatRange(start: number | bigint, end: number | bigint): string;
|
|
50
|
+
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
|
51
|
+
}
|
|
52
|
+
}
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -4427,12 +4427,33 @@ declare namespace Intl {
|
|
|
4427
4427
|
|
|
4428
4428
|
var Collator: CollatorConstructor;
|
|
4429
4429
|
|
|
4430
|
+
interface NumberFormatOptionsStyleRegistry {
|
|
4431
|
+
decimal: any;
|
|
4432
|
+
percent: any;
|
|
4433
|
+
currency: any;
|
|
4434
|
+
}
|
|
4435
|
+
|
|
4436
|
+
type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry;
|
|
4437
|
+
|
|
4438
|
+
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
4439
|
+
code: any;
|
|
4440
|
+
symbol: any;
|
|
4441
|
+
name: any;
|
|
4442
|
+
}
|
|
4443
|
+
|
|
4444
|
+
type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry;
|
|
4445
|
+
|
|
4446
|
+
interface NumberFormatOptionsUseGroupingRegistry {}
|
|
4447
|
+
|
|
4448
|
+
type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean;
|
|
4449
|
+
type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false;
|
|
4450
|
+
|
|
4430
4451
|
interface NumberFormatOptions {
|
|
4431
|
-
localeMatcher?:
|
|
4432
|
-
style?:
|
|
4452
|
+
localeMatcher?: "lookup" | "best fit" | undefined;
|
|
4453
|
+
style?: NumberFormatOptionsStyle | undefined;
|
|
4433
4454
|
currency?: string | undefined;
|
|
4434
|
-
|
|
4435
|
-
useGrouping?:
|
|
4455
|
+
currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
4456
|
+
useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
4436
4457
|
minimumIntegerDigits?: number | undefined;
|
|
4437
4458
|
minimumFractionDigits?: number | undefined;
|
|
4438
4459
|
maximumFractionDigits?: number | undefined;
|
|
@@ -4443,14 +4464,15 @@ declare namespace Intl {
|
|
|
4443
4464
|
interface ResolvedNumberFormatOptions {
|
|
4444
4465
|
locale: string;
|
|
4445
4466
|
numberingSystem: string;
|
|
4446
|
-
style:
|
|
4467
|
+
style: NumberFormatOptionsStyle;
|
|
4447
4468
|
currency?: string;
|
|
4469
|
+
currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
4448
4470
|
minimumIntegerDigits: number;
|
|
4449
4471
|
minimumFractionDigits: number;
|
|
4450
4472
|
maximumFractionDigits: number;
|
|
4451
4473
|
minimumSignificantDigits?: number;
|
|
4452
4474
|
maximumSignificantDigits?: number;
|
|
4453
|
-
useGrouping:
|
|
4475
|
+
useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
4454
4476
|
}
|
|
4455
4477
|
|
|
4456
4478
|
interface NumberFormat {
|
package/lib/lib.esnext.intl.d.ts
CHANGED
|
@@ -17,12 +17,5 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
declare namespace Intl {
|
|
20
|
-
|
|
21
|
-
source: "startRange" | "endRange" | "shared";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface NumberFormat {
|
|
25
|
-
formatRange(start: number | bigint, end: number | bigint): string;
|
|
26
|
-
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
|
27
|
-
}
|
|
20
|
+
// Empty
|
|
28
21
|
}
|
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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -34076,6 +34076,7 @@ var libEntries = [
|
|
|
34076
34076
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
34077
34077
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
34078
34078
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
34079
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
34079
34080
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
34080
34081
|
["esnext.collection", "lib.es2023.collection.d.ts"],
|
|
34081
34082
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
@@ -75732,7 +75733,7 @@ function createTypeChecker(host) {
|
|
|
75732
75733
|
const context = getInferenceContext(node);
|
|
75733
75734
|
const returnType = context.signature && getReturnTypeOfSignature(context.signature);
|
|
75734
75735
|
const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);
|
|
75735
|
-
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences,
|
|
75736
|
+
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
75736
75737
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
75737
75738
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
75738
75739
|
const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
@@ -75751,8 +75752,8 @@ function createTypeChecker(host) {
|
|
|
75751
75752
|
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
75752
75753
|
inferTypes(inferences, source, target);
|
|
75753
75754
|
});
|
|
75754
|
-
|
|
75755
|
-
|
|
75755
|
+
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
|
75756
|
+
mergeInferences(context.inferences, inferences);
|
|
75756
75757
|
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
|
75757
75758
|
return getOrCreateTypeFromSignature(instantiatedSignature);
|
|
75758
75759
|
}
|
|
@@ -75785,17 +75786,12 @@ function createTypeChecker(host) {
|
|
|
75785
75786
|
}
|
|
75786
75787
|
return false;
|
|
75787
75788
|
}
|
|
75788
|
-
function
|
|
75789
|
-
let merged = false;
|
|
75790
|
-
const areOverlapping = hasOverlappingInferences(target, source);
|
|
75789
|
+
function mergeInferences(target, source) {
|
|
75791
75790
|
for (let i = 0; i < target.length; i++) {
|
|
75792
|
-
if (
|
|
75791
|
+
if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {
|
|
75793
75792
|
target[i] = source[i];
|
|
75794
|
-
target[i].priority = 0 /* None */;
|
|
75795
|
-
merged = true;
|
|
75796
75793
|
}
|
|
75797
75794
|
}
|
|
75798
|
-
return merged;
|
|
75799
75795
|
}
|
|
75800
75796
|
function getUniqueTypeParameters(context, typeParameters) {
|
|
75801
75797
|
const result = [];
|
package/lib/tsserver.js
CHANGED
|
@@ -2341,7 +2341,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2341
2341
|
|
|
2342
2342
|
// src/compiler/corePublic.ts
|
|
2343
2343
|
var versionMajorMinor = "5.4";
|
|
2344
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2344
|
+
var version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
2345
2345
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2346
2346
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2347
2347
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -38504,6 +38504,7 @@ var libEntries = [
|
|
|
38504
38504
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
38505
38505
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
38506
38506
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
38507
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
38507
38508
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
38508
38509
|
["esnext.collection", "lib.es2023.collection.d.ts"],
|
|
38509
38510
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
@@ -80460,7 +80461,7 @@ function createTypeChecker(host) {
|
|
|
80460
80461
|
const context = getInferenceContext(node);
|
|
80461
80462
|
const returnType = context.signature && getReturnTypeOfSignature(context.signature);
|
|
80462
80463
|
const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);
|
|
80463
|
-
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences,
|
|
80464
|
+
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
80464
80465
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
80465
80466
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
80466
80467
|
const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
@@ -80479,8 +80480,8 @@ function createTypeChecker(host) {
|
|
|
80479
80480
|
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
80480
80481
|
inferTypes(inferences, source, target);
|
|
80481
80482
|
});
|
|
80482
|
-
|
|
80483
|
-
|
|
80483
|
+
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
|
80484
|
+
mergeInferences(context.inferences, inferences);
|
|
80484
80485
|
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
|
80485
80486
|
return getOrCreateTypeFromSignature(instantiatedSignature);
|
|
80486
80487
|
}
|
|
@@ -80513,17 +80514,12 @@ function createTypeChecker(host) {
|
|
|
80513
80514
|
}
|
|
80514
80515
|
return false;
|
|
80515
80516
|
}
|
|
80516
|
-
function
|
|
80517
|
-
let merged = false;
|
|
80518
|
-
const areOverlapping = hasOverlappingInferences(target, source);
|
|
80517
|
+
function mergeInferences(target, source) {
|
|
80519
80518
|
for (let i = 0; i < target.length; i++) {
|
|
80520
|
-
if (
|
|
80519
|
+
if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {
|
|
80521
80520
|
target[i] = source[i];
|
|
80522
|
-
target[i].priority = 0 /* None */;
|
|
80523
|
-
merged = true;
|
|
80524
80521
|
}
|
|
80525
80522
|
}
|
|
80526
|
-
return merged;
|
|
80527
80523
|
}
|
|
80528
80524
|
function getUniqueTypeParameters(context, typeParameters) {
|
|
80529
80525
|
const result = [];
|
|
@@ -147133,13 +147129,14 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni
|
|
|
147133
147129
|
const symbol = contextualType.getProperty(name);
|
|
147134
147130
|
return symbol ? [symbol] : emptyArray;
|
|
147135
147131
|
}
|
|
147136
|
-
const
|
|
147132
|
+
const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types;
|
|
147133
|
+
const discriminatedPropertySymbols = mapDefined(filteredTypes, (t) => t.getProperty(name));
|
|
147137
147134
|
if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) {
|
|
147138
147135
|
const symbol = contextualType.getProperty(name);
|
|
147139
147136
|
if (symbol)
|
|
147140
147137
|
return [symbol];
|
|
147141
147138
|
}
|
|
147142
|
-
if (
|
|
147139
|
+
if (!filteredTypes.length && !discriminatedPropertySymbols.length) {
|
|
147143
147140
|
return mapDefined(contextualType.types, (t) => t.getProperty(name));
|
|
147144
147141
|
}
|
|
147145
147142
|
return deduplicate(discriminatedPropertySymbols, equateValues);
|
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.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -37998,6 +37998,7 @@ ${lanes.join("\n")}
|
|
|
37998
37998
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
37999
37999
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
38000
38000
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
38001
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
38001
38002
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
38002
38003
|
["esnext.collection", "lib.es2023.collection.d.ts"],
|
|
38003
38004
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
@@ -78214,7 +78215,7 @@ ${lanes.join("\n")}
|
|
|
78214
78215
|
const context = getInferenceContext(node);
|
|
78215
78216
|
const returnType = context.signature && getReturnTypeOfSignature(context.signature);
|
|
78216
78217
|
const returnSignature = returnType && getSingleCallOrConstructSignature(returnType);
|
|
78217
|
-
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences,
|
|
78218
|
+
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
78218
78219
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
78219
78220
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
78220
78221
|
const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
@@ -78233,8 +78234,8 @@ ${lanes.join("\n")}
|
|
|
78233
78234
|
applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
78234
78235
|
inferTypes(inferences, source, target);
|
|
78235
78236
|
});
|
|
78236
|
-
|
|
78237
|
-
|
|
78237
|
+
if (!hasOverlappingInferences(context.inferences, inferences)) {
|
|
78238
|
+
mergeInferences(context.inferences, inferences);
|
|
78238
78239
|
context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters);
|
|
78239
78240
|
return getOrCreateTypeFromSignature(instantiatedSignature);
|
|
78240
78241
|
}
|
|
@@ -78267,17 +78268,12 @@ ${lanes.join("\n")}
|
|
|
78267
78268
|
}
|
|
78268
78269
|
return false;
|
|
78269
78270
|
}
|
|
78270
|
-
function
|
|
78271
|
-
let merged = false;
|
|
78272
|
-
const areOverlapping = hasOverlappingInferences(target, source);
|
|
78271
|
+
function mergeInferences(target, source) {
|
|
78273
78272
|
for (let i = 0; i < target.length; i++) {
|
|
78274
|
-
if (
|
|
78273
|
+
if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) {
|
|
78275
78274
|
target[i] = source[i];
|
|
78276
|
-
target[i].priority = 0 /* None */;
|
|
78277
|
-
merged = true;
|
|
78278
78275
|
}
|
|
78279
78276
|
}
|
|
78280
|
-
return merged;
|
|
78281
78277
|
}
|
|
78282
78278
|
function getUniqueTypeParameters(context, typeParameters) {
|
|
78283
78279
|
const result = [];
|
|
@@ -145063,13 +145059,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
145063
145059
|
const symbol = contextualType.getProperty(name);
|
|
145064
145060
|
return symbol ? [symbol] : emptyArray;
|
|
145065
145061
|
}
|
|
145066
|
-
const
|
|
145062
|
+
const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types;
|
|
145063
|
+
const discriminatedPropertySymbols = mapDefined(filteredTypes, (t) => t.getProperty(name));
|
|
145067
145064
|
if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) {
|
|
145068
145065
|
const symbol = contextualType.getProperty(name);
|
|
145069
145066
|
if (symbol)
|
|
145070
145067
|
return [symbol];
|
|
145071
145068
|
}
|
|
145072
|
-
if (
|
|
145069
|
+
if (!filteredTypes.length && !discriminatedPropertySymbols.length) {
|
|
145073
145070
|
return mapDefined(contextualType.types, (t) => t.getProperty(name));
|
|
145074
145071
|
}
|
|
145075
145072
|
return deduplicate(discriminatedPropertySymbols, equateValues);
|
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.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20240104`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -25932,6 +25932,7 @@ var libEntries = [
|
|
|
25932
25932
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
25933
25933
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
25934
25934
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
25935
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
25935
25936
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
25936
25937
|
["esnext.collection", "lib.es2023.collection.d.ts"],
|
|
25937
25938
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
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.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56902-8",
|
|
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": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "c379e13d533fa68cb366a822ad8455adfaf63ba7"
|
|
118
118
|
}
|