typescript 5.5.0-dev.20240229 → 5.5.0-dev.20240302
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.es2019.intl.d.ts +1 -1
- 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 +30 -8
- package/lib/lib.esnext.intl.d.ts +1 -8
- package/lib/tsc.js +49 -34
- package/lib/tsserver.js +49 -34
- package/lib/typescript.js +49 -34
- 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: never;
|
|
60
|
+
nan: never;
|
|
61
|
+
infinity: never;
|
|
62
|
+
percent: never;
|
|
63
|
+
integer: never;
|
|
64
|
+
group: never;
|
|
65
|
+
decimal: never;
|
|
66
|
+
fraction: never;
|
|
67
|
+
plusSign: never;
|
|
68
|
+
minusSign: never;
|
|
69
|
+
percentSign: never;
|
|
70
|
+
currency: never;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
|
|
62
74
|
|
|
63
75
|
interface NumberFormatPart {
|
|
64
76
|
type: NumberFormatPartTypes;
|
package/lib/lib.es2019.intl.d.ts
CHANGED
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: never;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
249
|
+
narrowSymbol: never;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
interface NumberFormatOptionsSignDisplayRegistry {
|
|
253
|
+
auto: never;
|
|
254
|
+
never: never;
|
|
255
|
+
always: never;
|
|
256
|
+
exceptZero: never;
|
|
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: never;
|
|
282
|
+
exponentInteger: never;
|
|
283
|
+
exponentMinusSign: never;
|
|
284
|
+
exponentSeparator: never;
|
|
285
|
+
unit: never;
|
|
286
|
+
unknown: never;
|
|
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: never;
|
|
22
|
+
auto: never;
|
|
23
|
+
always: never;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface NumberFormatOptionsSignDisplayRegistry {
|
|
27
|
+
negative: never;
|
|
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
|
@@ -4433,12 +4433,33 @@ declare namespace Intl {
|
|
|
4433
4433
|
|
|
4434
4434
|
var Collator: CollatorConstructor;
|
|
4435
4435
|
|
|
4436
|
+
interface NumberFormatOptionsStyleRegistry {
|
|
4437
|
+
decimal: never;
|
|
4438
|
+
percent: never;
|
|
4439
|
+
currency: never;
|
|
4440
|
+
}
|
|
4441
|
+
|
|
4442
|
+
type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry;
|
|
4443
|
+
|
|
4444
|
+
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
4445
|
+
code: never;
|
|
4446
|
+
symbol: never;
|
|
4447
|
+
name: never;
|
|
4448
|
+
}
|
|
4449
|
+
|
|
4450
|
+
type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry;
|
|
4451
|
+
|
|
4452
|
+
interface NumberFormatOptionsUseGroupingRegistry {}
|
|
4453
|
+
|
|
4454
|
+
type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean;
|
|
4455
|
+
type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false;
|
|
4456
|
+
|
|
4436
4457
|
interface NumberFormatOptions {
|
|
4437
|
-
localeMatcher?:
|
|
4438
|
-
style?:
|
|
4458
|
+
localeMatcher?: "lookup" | "best fit" | undefined;
|
|
4459
|
+
style?: NumberFormatOptionsStyle | undefined;
|
|
4439
4460
|
currency?: string | undefined;
|
|
4440
|
-
|
|
4441
|
-
useGrouping?:
|
|
4461
|
+
currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
|
|
4462
|
+
useGrouping?: NumberFormatOptionsUseGrouping | undefined;
|
|
4442
4463
|
minimumIntegerDigits?: number | undefined;
|
|
4443
4464
|
minimumFractionDigits?: number | undefined;
|
|
4444
4465
|
maximumFractionDigits?: number | undefined;
|
|
@@ -4449,14 +4470,15 @@ declare namespace Intl {
|
|
|
4449
4470
|
interface ResolvedNumberFormatOptions {
|
|
4450
4471
|
locale: string;
|
|
4451
4472
|
numberingSystem: string;
|
|
4452
|
-
style:
|
|
4473
|
+
style: NumberFormatOptionsStyle;
|
|
4453
4474
|
currency?: string;
|
|
4475
|
+
currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
4454
4476
|
minimumIntegerDigits: number;
|
|
4455
|
-
minimumFractionDigits
|
|
4456
|
-
maximumFractionDigits
|
|
4477
|
+
minimumFractionDigits?: number;
|
|
4478
|
+
maximumFractionDigits?: number;
|
|
4457
4479
|
minimumSignificantDigits?: number;
|
|
4458
4480
|
maximumSignificantDigits?: number;
|
|
4459
|
-
useGrouping:
|
|
4481
|
+
useGrouping: ResolvedNumberFormatOptionsUseGrouping;
|
|
4460
4482
|
}
|
|
4461
4483
|
|
|
4462
4484
|
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.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20240302`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -33723,6 +33723,7 @@ var libEntries = [
|
|
|
33723
33723
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
33724
33724
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
33725
33725
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
33726
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
33726
33727
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
33727
33728
|
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
33728
33729
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
@@ -40995,7 +40996,7 @@ function createBinder() {
|
|
|
40995
40996
|
return Diagnostics.Invalid_use_of_0_in_strict_mode;
|
|
40996
40997
|
}
|
|
40997
40998
|
function checkStrictModeFunctionName(node) {
|
|
40998
|
-
if (inStrictMode) {
|
|
40999
|
+
if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {
|
|
40999
41000
|
checkStrictModeEvalOrArguments(node, node.name);
|
|
41000
41001
|
}
|
|
41001
41002
|
}
|
|
@@ -74505,11 +74506,13 @@ function createTypeChecker(host) {
|
|
|
74505
74506
|
}
|
|
74506
74507
|
function getSymbolHasInstanceMethodOfObjectType(type) {
|
|
74507
74508
|
const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance");
|
|
74508
|
-
|
|
74509
|
-
|
|
74510
|
-
|
|
74511
|
-
|
|
74512
|
-
|
|
74509
|
+
if (allTypesAssignableToKind(type, 67108864 /* NonPrimitive */)) {
|
|
74510
|
+
const hasInstanceProperty = getPropertyOfType(type, hasInstancePropertyName);
|
|
74511
|
+
if (hasInstanceProperty) {
|
|
74512
|
+
const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);
|
|
74513
|
+
if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {
|
|
74514
|
+
return hasInstancePropertyType;
|
|
74515
|
+
}
|
|
74513
74516
|
}
|
|
74514
74517
|
}
|
|
74515
74518
|
}
|
|
@@ -78621,7 +78624,9 @@ function createTypeChecker(host) {
|
|
|
78621
78624
|
function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) {
|
|
78622
78625
|
const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
|
|
78623
78626
|
if (inputType === neverType) {
|
|
78624
|
-
|
|
78627
|
+
if (errorNode) {
|
|
78628
|
+
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
|
78629
|
+
}
|
|
78625
78630
|
return void 0;
|
|
78626
78631
|
}
|
|
78627
78632
|
const uplevelIteration = languageVersion >= 2 /* ES2015 */;
|
|
@@ -82555,6 +82560,15 @@ function createTypeChecker(host) {
|
|
|
82555
82560
|
}
|
|
82556
82561
|
return false;
|
|
82557
82562
|
}
|
|
82563
|
+
function declaredParameterTypeContainsUndefined(parameter) {
|
|
82564
|
+
if (!parameter.type)
|
|
82565
|
+
return false;
|
|
82566
|
+
const type = getTypeFromTypeNode(parameter.type);
|
|
82567
|
+
return containsUndefinedType(type);
|
|
82568
|
+
}
|
|
82569
|
+
function requiresAddingImplicitUndefined(parameter) {
|
|
82570
|
+
return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter);
|
|
82571
|
+
}
|
|
82558
82572
|
function isRequiredInitializedParameter(parameter) {
|
|
82559
82573
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
82560
82574
|
}
|
|
@@ -82914,8 +82928,7 @@ function createTypeChecker(host) {
|
|
|
82914
82928
|
isTopLevelValueImportEqualsWithEntityName,
|
|
82915
82929
|
isDeclarationVisible,
|
|
82916
82930
|
isImplementationOfOverload,
|
|
82917
|
-
|
|
82918
|
-
isOptionalUninitializedParameterProperty,
|
|
82931
|
+
requiresAddingImplicitUndefined,
|
|
82919
82932
|
isExpandoFunctionDeclaration,
|
|
82920
82933
|
getPropertiesOfContainerFunction,
|
|
82921
82934
|
createTypeOfDeclaration,
|
|
@@ -108473,38 +108486,41 @@ function transformDeclarations(context) {
|
|
|
108473
108486
|
if (shouldPrintWithInitializer(node)) {
|
|
108474
108487
|
return;
|
|
108475
108488
|
}
|
|
108476
|
-
const
|
|
108477
|
-
if (type && !
|
|
108489
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
108490
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
108478
108491
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
108479
108492
|
}
|
|
108480
|
-
if (!getParseTreeNode(node)) {
|
|
108481
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108482
|
-
}
|
|
108483
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
108484
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108485
|
-
}
|
|
108486
108493
|
errorNameNode = node.name;
|
|
108487
108494
|
let oldDiag;
|
|
108488
108495
|
if (!suppressNewDiagnosticContexts) {
|
|
108489
108496
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
108490
108497
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
108491
108498
|
}
|
|
108492
|
-
|
|
108493
|
-
|
|
108494
|
-
|
|
108495
|
-
|
|
108496
|
-
|
|
108497
|
-
|
|
108498
|
-
|
|
108499
|
+
let typeNode;
|
|
108500
|
+
switch (node.kind) {
|
|
108501
|
+
case 169 /* Parameter */:
|
|
108502
|
+
case 171 /* PropertySignature */:
|
|
108503
|
+
case 172 /* PropertyDeclaration */:
|
|
108504
|
+
case 208 /* BindingElement */:
|
|
108505
|
+
case 260 /* VariableDeclaration */:
|
|
108506
|
+
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldAddImplicitUndefined);
|
|
108507
|
+
break;
|
|
108508
|
+
case 262 /* FunctionDeclaration */:
|
|
108509
|
+
case 180 /* ConstructSignature */:
|
|
108510
|
+
case 173 /* MethodSignature */:
|
|
108511
|
+
case 174 /* MethodDeclaration */:
|
|
108512
|
+
case 177 /* GetAccessor */:
|
|
108513
|
+
case 179 /* CallSignature */:
|
|
108514
|
+
typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
|
|
108515
|
+
break;
|
|
108516
|
+
default:
|
|
108517
|
+
Debug.assertNever(node);
|
|
108499
108518
|
}
|
|
108500
|
-
|
|
108501
|
-
|
|
108502
|
-
|
|
108503
|
-
if (!suppressNewDiagnosticContexts) {
|
|
108504
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
108505
|
-
}
|
|
108506
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108519
|
+
errorNameNode = void 0;
|
|
108520
|
+
if (!suppressNewDiagnosticContexts) {
|
|
108521
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
108507
108522
|
}
|
|
108523
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
108508
108524
|
}
|
|
108509
108525
|
function isDeclarationAndNotVisible(node) {
|
|
108510
108526
|
node = getParseTreeNode(node);
|
|
@@ -110697,8 +110713,7 @@ var notImplementedResolver = {
|
|
|
110697
110713
|
isLateBound: (_node) => false,
|
|
110698
110714
|
collectLinkedAliases: notImplemented,
|
|
110699
110715
|
isImplementationOfOverload: notImplemented,
|
|
110700
|
-
|
|
110701
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
110716
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
110702
110717
|
isExpandoFunctionDeclaration: notImplemented,
|
|
110703
110718
|
getPropertiesOfContainerFunction: notImplemented,
|
|
110704
110719
|
createTypeOfDeclaration: notImplemented,
|
package/lib/tsserver.js
CHANGED
|
@@ -2325,7 +2325,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2325
2325
|
|
|
2326
2326
|
// src/compiler/corePublic.ts
|
|
2327
2327
|
var versionMajorMinor = "5.5";
|
|
2328
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2328
|
+
var version = `${versionMajorMinor}.0-dev.20240302`;
|
|
2329
2329
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2330
2330
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2331
2331
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -38133,6 +38133,7 @@ var libEntries = [
|
|
|
38133
38133
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
38134
38134
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
38135
38135
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
38136
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
38136
38137
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
38137
38138
|
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
38138
38139
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
@@ -45660,7 +45661,7 @@ function createBinder() {
|
|
|
45660
45661
|
return Diagnostics.Invalid_use_of_0_in_strict_mode;
|
|
45661
45662
|
}
|
|
45662
45663
|
function checkStrictModeFunctionName(node) {
|
|
45663
|
-
if (inStrictMode) {
|
|
45664
|
+
if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {
|
|
45664
45665
|
checkStrictModeEvalOrArguments(node, node.name);
|
|
45665
45666
|
}
|
|
45666
45667
|
}
|
|
@@ -79224,11 +79225,13 @@ function createTypeChecker(host) {
|
|
|
79224
79225
|
}
|
|
79225
79226
|
function getSymbolHasInstanceMethodOfObjectType(type) {
|
|
79226
79227
|
const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance");
|
|
79227
|
-
|
|
79228
|
-
|
|
79229
|
-
|
|
79230
|
-
|
|
79231
|
-
|
|
79228
|
+
if (allTypesAssignableToKind(type, 67108864 /* NonPrimitive */)) {
|
|
79229
|
+
const hasInstanceProperty = getPropertyOfType(type, hasInstancePropertyName);
|
|
79230
|
+
if (hasInstanceProperty) {
|
|
79231
|
+
const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);
|
|
79232
|
+
if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {
|
|
79233
|
+
return hasInstancePropertyType;
|
|
79234
|
+
}
|
|
79232
79235
|
}
|
|
79233
79236
|
}
|
|
79234
79237
|
}
|
|
@@ -83340,7 +83343,9 @@ function createTypeChecker(host) {
|
|
|
83340
83343
|
function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) {
|
|
83341
83344
|
const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
|
|
83342
83345
|
if (inputType === neverType) {
|
|
83343
|
-
|
|
83346
|
+
if (errorNode) {
|
|
83347
|
+
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
|
83348
|
+
}
|
|
83344
83349
|
return void 0;
|
|
83345
83350
|
}
|
|
83346
83351
|
const uplevelIteration = languageVersion >= 2 /* ES2015 */;
|
|
@@ -87274,6 +87279,15 @@ function createTypeChecker(host) {
|
|
|
87274
87279
|
}
|
|
87275
87280
|
return false;
|
|
87276
87281
|
}
|
|
87282
|
+
function declaredParameterTypeContainsUndefined(parameter) {
|
|
87283
|
+
if (!parameter.type)
|
|
87284
|
+
return false;
|
|
87285
|
+
const type = getTypeFromTypeNode(parameter.type);
|
|
87286
|
+
return containsUndefinedType(type);
|
|
87287
|
+
}
|
|
87288
|
+
function requiresAddingImplicitUndefined(parameter) {
|
|
87289
|
+
return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter);
|
|
87290
|
+
}
|
|
87277
87291
|
function isRequiredInitializedParameter(parameter) {
|
|
87278
87292
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
87279
87293
|
}
|
|
@@ -87633,8 +87647,7 @@ function createTypeChecker(host) {
|
|
|
87633
87647
|
isTopLevelValueImportEqualsWithEntityName,
|
|
87634
87648
|
isDeclarationVisible,
|
|
87635
87649
|
isImplementationOfOverload,
|
|
87636
|
-
|
|
87637
|
-
isOptionalUninitializedParameterProperty,
|
|
87650
|
+
requiresAddingImplicitUndefined,
|
|
87638
87651
|
isExpandoFunctionDeclaration,
|
|
87639
87652
|
getPropertiesOfContainerFunction,
|
|
87640
87653
|
createTypeOfDeclaration,
|
|
@@ -113379,38 +113392,41 @@ function transformDeclarations(context) {
|
|
|
113379
113392
|
if (shouldPrintWithInitializer(node)) {
|
|
113380
113393
|
return;
|
|
113381
113394
|
}
|
|
113382
|
-
const
|
|
113383
|
-
if (type && !
|
|
113395
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
113396
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
113384
113397
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
113385
113398
|
}
|
|
113386
|
-
if (!getParseTreeNode(node)) {
|
|
113387
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113388
|
-
}
|
|
113389
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
113390
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113391
|
-
}
|
|
113392
113399
|
errorNameNode = node.name;
|
|
113393
113400
|
let oldDiag;
|
|
113394
113401
|
if (!suppressNewDiagnosticContexts) {
|
|
113395
113402
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
113396
113403
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
113397
113404
|
}
|
|
113398
|
-
|
|
113399
|
-
|
|
113400
|
-
|
|
113401
|
-
|
|
113402
|
-
|
|
113403
|
-
|
|
113404
|
-
|
|
113405
|
+
let typeNode;
|
|
113406
|
+
switch (node.kind) {
|
|
113407
|
+
case 169 /* Parameter */:
|
|
113408
|
+
case 171 /* PropertySignature */:
|
|
113409
|
+
case 172 /* PropertyDeclaration */:
|
|
113410
|
+
case 208 /* BindingElement */:
|
|
113411
|
+
case 260 /* VariableDeclaration */:
|
|
113412
|
+
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldAddImplicitUndefined);
|
|
113413
|
+
break;
|
|
113414
|
+
case 262 /* FunctionDeclaration */:
|
|
113415
|
+
case 180 /* ConstructSignature */:
|
|
113416
|
+
case 173 /* MethodSignature */:
|
|
113417
|
+
case 174 /* MethodDeclaration */:
|
|
113418
|
+
case 177 /* GetAccessor */:
|
|
113419
|
+
case 179 /* CallSignature */:
|
|
113420
|
+
typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
|
|
113421
|
+
break;
|
|
113422
|
+
default:
|
|
113423
|
+
Debug.assertNever(node);
|
|
113405
113424
|
}
|
|
113406
|
-
|
|
113407
|
-
|
|
113408
|
-
|
|
113409
|
-
if (!suppressNewDiagnosticContexts) {
|
|
113410
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113411
|
-
}
|
|
113412
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113425
|
+
errorNameNode = void 0;
|
|
113426
|
+
if (!suppressNewDiagnosticContexts) {
|
|
113427
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
113413
113428
|
}
|
|
113429
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
113414
113430
|
}
|
|
113415
113431
|
function isDeclarationAndNotVisible(node) {
|
|
113416
113432
|
node = getParseTreeNode(node);
|
|
@@ -115614,8 +115630,7 @@ var notImplementedResolver = {
|
|
|
115614
115630
|
isLateBound: (_node) => false,
|
|
115615
115631
|
collectLinkedAliases: notImplemented,
|
|
115616
115632
|
isImplementationOfOverload: notImplemented,
|
|
115617
|
-
|
|
115618
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
115633
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
115619
115634
|
isExpandoFunctionDeclaration: notImplemented,
|
|
115620
115635
|
getPropertiesOfContainerFunction: notImplemented,
|
|
115621
115636
|
createTypeOfDeclaration: notImplemented,
|
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.5";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20240302`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -37644,6 +37644,7 @@ ${lanes.join("\n")}
|
|
|
37644
37644
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
37645
37645
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
37646
37646
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
37647
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
37647
37648
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
37648
37649
|
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
37649
37650
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
@@ -43511,7 +43512,7 @@ ${lanes.join("\n")}
|
|
|
43511
43512
|
return Diagnostics.Invalid_use_of_0_in_strict_mode;
|
|
43512
43513
|
}
|
|
43513
43514
|
function checkStrictModeFunctionName(node) {
|
|
43514
|
-
if (inStrictMode) {
|
|
43515
|
+
if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {
|
|
43515
43516
|
checkStrictModeEvalOrArguments(node, node.name);
|
|
43516
43517
|
}
|
|
43517
43518
|
}
|
|
@@ -76995,11 +76996,13 @@ ${lanes.join("\n")}
|
|
|
76995
76996
|
}
|
|
76996
76997
|
function getSymbolHasInstanceMethodOfObjectType(type) {
|
|
76997
76998
|
const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance");
|
|
76998
|
-
|
|
76999
|
-
|
|
77000
|
-
|
|
77001
|
-
|
|
77002
|
-
|
|
76999
|
+
if (allTypesAssignableToKind(type, 67108864 /* NonPrimitive */)) {
|
|
77000
|
+
const hasInstanceProperty = getPropertyOfType(type, hasInstancePropertyName);
|
|
77001
|
+
if (hasInstanceProperty) {
|
|
77002
|
+
const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);
|
|
77003
|
+
if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {
|
|
77004
|
+
return hasInstancePropertyType;
|
|
77005
|
+
}
|
|
77003
77006
|
}
|
|
77004
77007
|
}
|
|
77005
77008
|
}
|
|
@@ -81111,7 +81114,9 @@ ${lanes.join("\n")}
|
|
|
81111
81114
|
function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) {
|
|
81112
81115
|
const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
|
|
81113
81116
|
if (inputType === neverType) {
|
|
81114
|
-
|
|
81117
|
+
if (errorNode) {
|
|
81118
|
+
reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
|
|
81119
|
+
}
|
|
81115
81120
|
return void 0;
|
|
81116
81121
|
}
|
|
81117
81122
|
const uplevelIteration = languageVersion >= 2 /* ES2015 */;
|
|
@@ -85045,6 +85050,15 @@ ${lanes.join("\n")}
|
|
|
85045
85050
|
}
|
|
85046
85051
|
return false;
|
|
85047
85052
|
}
|
|
85053
|
+
function declaredParameterTypeContainsUndefined(parameter) {
|
|
85054
|
+
if (!parameter.type)
|
|
85055
|
+
return false;
|
|
85056
|
+
const type = getTypeFromTypeNode(parameter.type);
|
|
85057
|
+
return containsUndefinedType(type);
|
|
85058
|
+
}
|
|
85059
|
+
function requiresAddingImplicitUndefined(parameter) {
|
|
85060
|
+
return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter);
|
|
85061
|
+
}
|
|
85048
85062
|
function isRequiredInitializedParameter(parameter) {
|
|
85049
85063
|
return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */);
|
|
85050
85064
|
}
|
|
@@ -85404,8 +85418,7 @@ ${lanes.join("\n")}
|
|
|
85404
85418
|
isTopLevelValueImportEqualsWithEntityName,
|
|
85405
85419
|
isDeclarationVisible,
|
|
85406
85420
|
isImplementationOfOverload,
|
|
85407
|
-
|
|
85408
|
-
isOptionalUninitializedParameterProperty,
|
|
85421
|
+
requiresAddingImplicitUndefined,
|
|
85409
85422
|
isExpandoFunctionDeclaration,
|
|
85410
85423
|
getPropertiesOfContainerFunction,
|
|
85411
85424
|
createTypeOfDeclaration,
|
|
@@ -111454,38 +111467,41 @@ ${lanes.join("\n")}
|
|
|
111454
111467
|
if (shouldPrintWithInitializer(node)) {
|
|
111455
111468
|
return;
|
|
111456
111469
|
}
|
|
111457
|
-
const
|
|
111458
|
-
if (type && !
|
|
111470
|
+
const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node);
|
|
111471
|
+
if (type && !shouldAddImplicitUndefined) {
|
|
111459
111472
|
return visitNode(type, visitDeclarationSubtree, isTypeNode);
|
|
111460
111473
|
}
|
|
111461
|
-
if (!getParseTreeNode(node)) {
|
|
111462
|
-
return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
111463
|
-
}
|
|
111464
|
-
if (node.kind === 178 /* SetAccessor */) {
|
|
111465
|
-
return factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
111466
|
-
}
|
|
111467
111474
|
errorNameNode = node.name;
|
|
111468
111475
|
let oldDiag;
|
|
111469
111476
|
if (!suppressNewDiagnosticContexts) {
|
|
111470
111477
|
oldDiag = getSymbolAccessibilityDiagnostic;
|
|
111471
111478
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node);
|
|
111472
111479
|
}
|
|
111473
|
-
|
|
111474
|
-
|
|
111475
|
-
|
|
111476
|
-
|
|
111477
|
-
|
|
111478
|
-
|
|
111479
|
-
|
|
111480
|
+
let typeNode;
|
|
111481
|
+
switch (node.kind) {
|
|
111482
|
+
case 169 /* Parameter */:
|
|
111483
|
+
case 171 /* PropertySignature */:
|
|
111484
|
+
case 172 /* PropertyDeclaration */:
|
|
111485
|
+
case 208 /* BindingElement */:
|
|
111486
|
+
case 260 /* VariableDeclaration */:
|
|
111487
|
+
typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldAddImplicitUndefined);
|
|
111488
|
+
break;
|
|
111489
|
+
case 262 /* FunctionDeclaration */:
|
|
111490
|
+
case 180 /* ConstructSignature */:
|
|
111491
|
+
case 173 /* MethodSignature */:
|
|
111492
|
+
case 174 /* MethodDeclaration */:
|
|
111493
|
+
case 177 /* GetAccessor */:
|
|
111494
|
+
case 179 /* CallSignature */:
|
|
111495
|
+
typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker);
|
|
111496
|
+
break;
|
|
111497
|
+
default:
|
|
111498
|
+
Debug.assertNever(node);
|
|
111480
111499
|
}
|
|
111481
|
-
|
|
111482
|
-
|
|
111483
|
-
|
|
111484
|
-
if (!suppressNewDiagnosticContexts) {
|
|
111485
|
-
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
111486
|
-
}
|
|
111487
|
-
return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
111500
|
+
errorNameNode = void 0;
|
|
111501
|
+
if (!suppressNewDiagnosticContexts) {
|
|
111502
|
+
getSymbolAccessibilityDiagnostic = oldDiag;
|
|
111488
111503
|
}
|
|
111504
|
+
return typeNode ?? factory2.createKeywordTypeNode(133 /* AnyKeyword */);
|
|
111489
111505
|
}
|
|
111490
111506
|
function isDeclarationAndNotVisible(node) {
|
|
111491
111507
|
node = getParseTreeNode(node);
|
|
@@ -118122,8 +118138,7 @@ ${lanes.join("\n")}
|
|
|
118122
118138
|
isLateBound: (_node) => false,
|
|
118123
118139
|
collectLinkedAliases: notImplemented,
|
|
118124
118140
|
isImplementationOfOverload: notImplemented,
|
|
118125
|
-
|
|
118126
|
-
isOptionalUninitializedParameterProperty: notImplemented,
|
|
118141
|
+
requiresAddingImplicitUndefined: notImplemented,
|
|
118127
118142
|
isExpandoFunctionDeclaration: notImplemented,
|
|
118128
118143
|
getPropertiesOfContainerFunction: notImplemented,
|
|
118129
118144
|
createTypeOfDeclaration: notImplemented,
|
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.5";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20240302`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -25877,6 +25877,7 @@ var libEntries = [
|
|
|
25877
25877
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
25878
25878
|
["es2023.array", "lib.es2023.array.d.ts"],
|
|
25879
25879
|
["es2023.collection", "lib.es2023.collection.d.ts"],
|
|
25880
|
+
["es2023.intl", "lib.es2023.intl.d.ts"],
|
|
25880
25881
|
["esnext.array", "lib.es2023.array.d.ts"],
|
|
25881
25882
|
["esnext.collection", "lib.esnext.collection.d.ts"],
|
|
25882
25883
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.5.0-dev.
|
|
5
|
+
"version": "5.5.0-dev.20240302",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "0d78152bd7947694cd3e3d8422e338bf03499096"
|
|
117
117
|
}
|