typescript 4.7.0-dev.20220226 → 4.7.0-dev.20220301
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.es2020.bigint.d.ts +3 -1
- package/lib/lib.es2020.d.ts +2 -0
- package/lib/lib.es2020.date.d.ts +44 -0
- package/lib/lib.es2020.intl.d.ts +7 -0
- package/lib/lib.es2020.number.d.ts +30 -0
- package/lib/tsc.js +7 -7
- package/lib/tsserver.js +9 -16
- package/lib/tsserverlibrary.js +9 -16
- package/lib/typescript.js +9 -16
- package/lib/typescriptServices.js +9 -16
- package/lib/typingsInstaller.js +8 -15
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ and limitations under the License.
|
|
|
18
18
|
/// <reference no-default-lib="true"/>
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
/// <reference lib="es2020.intl" />
|
|
22
|
+
|
|
21
23
|
interface BigIntToLocaleStringOptions {
|
|
22
24
|
/**
|
|
23
25
|
* The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}.
|
|
@@ -112,7 +114,7 @@ interface BigInt {
|
|
|
112
114
|
toString(radix?: number): string;
|
|
113
115
|
|
|
114
116
|
/** Returns a string representation appropriate to the host environment's current locale. */
|
|
115
|
-
toLocaleString(locales?:
|
|
117
|
+
toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string;
|
|
116
118
|
|
|
117
119
|
/** Returns the primitive value of the specified object. */
|
|
118
120
|
valueOf(): bigint;
|
package/lib/lib.es2020.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ and limitations under the License.
|
|
|
20
20
|
|
|
21
21
|
/// <reference lib="es2019" />
|
|
22
22
|
/// <reference lib="es2020.bigint" />
|
|
23
|
+
/// <reference lib="es2020.date" />
|
|
24
|
+
/// <reference lib="es2020.number" />
|
|
23
25
|
/// <reference lib="es2020.promise" />
|
|
24
26
|
/// <reference lib="es2020.sharedmemory" />
|
|
25
27
|
/// <reference lib="es2020.string" />
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <reference lib="es2020.intl" />
|
|
22
|
+
|
|
23
|
+
interface Date {
|
|
24
|
+
/**
|
|
25
|
+
* Converts a date and time to a string by using the current or specified locale.
|
|
26
|
+
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
|
27
|
+
* @param options An object that contains one or more properties that specify comparison options.
|
|
28
|
+
*/
|
|
29
|
+
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Converts a date to a string by using the current or specified locale.
|
|
33
|
+
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
|
34
|
+
* @param options An object that contains one or more properties that specify comparison options.
|
|
35
|
+
*/
|
|
36
|
+
toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Converts a time to a string by using the current or specified locale.
|
|
40
|
+
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
|
41
|
+
* @param options An object that contains one or more properties that specify comparison options.
|
|
42
|
+
*/
|
|
43
|
+
toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
44
|
+
}
|
package/lib/lib.es2020.intl.d.ts
CHANGED
|
@@ -78,6 +78,13 @@ declare namespace Intl {
|
|
|
78
78
|
*/
|
|
79
79
|
type BCP47LanguageTag = string;
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The locale(s) to use
|
|
83
|
+
*
|
|
84
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
85
|
+
*/
|
|
86
|
+
type LocalesArgument = UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[] | Locale | Locale[] | undefined;
|
|
87
|
+
|
|
81
88
|
/**
|
|
82
89
|
* An object with some or all of properties of `options` parameter
|
|
83
90
|
* of `Intl.RelativeTimeFormat` constructor.
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
|
|
18
|
+
/// <reference no-default-lib="true"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <reference lib="es2020.intl" />
|
|
22
|
+
|
|
23
|
+
interface Number {
|
|
24
|
+
/**
|
|
25
|
+
* Converts a number to a string by using the current or specified locale.
|
|
26
|
+
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
|
27
|
+
* @param options An object that contains one or more properties that specify comparison options.
|
|
28
|
+
*/
|
|
29
|
+
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
|
|
30
|
+
}
|
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220301";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -25279,9 +25279,7 @@ var ts;
|
|
|
25279
25279
|
return;
|
|
25280
25280
|
}
|
|
25281
25281
|
if (initializer) {
|
|
25282
|
-
|
|
25283
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
|
|
25284
|
-
}
|
|
25282
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
|
|
25285
25283
|
return;
|
|
25286
25284
|
}
|
|
25287
25285
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -30944,11 +30942,13 @@ var ts;
|
|
|
30944
30942
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
30945
30943
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
30946
30944
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
30945
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
30947
30946
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
30948
30947
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
30949
30948
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
30950
30949
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
30951
30950
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
30951
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
30952
30952
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
30953
30953
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
30954
30954
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -51786,7 +51786,7 @@ var ts;
|
|
|
51786
51786
|
var checkType_1 = root.checkType;
|
|
51787
51787
|
var distributionType = root.isDistributive ? getMappedType(checkType_1, newMapper_1) : undefined;
|
|
51788
51788
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 | 131072) ?
|
|
51789
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
51789
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
51790
51790
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
51791
51791
|
root.instantiations.set(id, result);
|
|
51792
51792
|
}
|
|
@@ -54127,8 +54127,8 @@ var ts;
|
|
|
54127
54127
|
}
|
|
54128
54128
|
return 0;
|
|
54129
54129
|
}
|
|
54130
|
-
if (
|
|
54131
|
-
|
|
54130
|
+
if (relation === strictSubtypeRelation &&
|
|
54131
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
54132
54132
|
return 0;
|
|
54133
54133
|
}
|
|
54134
54134
|
var related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, intersectionState);
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220301";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -31377,18 +31377,8 @@ var ts;
|
|
|
31377
31377
|
if (tryParseSemicolon()) {
|
|
31378
31378
|
return;
|
|
31379
31379
|
}
|
|
31380
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31381
|
-
// we generally know there was an error already reported in the initializer...
|
|
31382
|
-
// class Example { a = new Map([), ) }
|
|
31383
|
-
// ~
|
|
31384
31380
|
if (initializer) {
|
|
31385
|
-
|
|
31386
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31387
|
-
// class Example { a = 0 {} }
|
|
31388
|
-
// ~
|
|
31389
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31390
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31391
|
-
}
|
|
31381
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31392
31382
|
return;
|
|
31393
31383
|
}
|
|
31394
31384
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -38325,11 +38315,13 @@ var ts;
|
|
|
38325
38315
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
38326
38316
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
38327
38317
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
38318
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
38328
38319
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
38329
38320
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
38330
38321
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
38331
38322
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
38332
38323
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
38324
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
38333
38325
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
38334
38326
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
38335
38327
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -62283,7 +62275,7 @@ var ts;
|
|
|
62283
62275
|
// distributive conditional type T extends U ? X : Y is instantiated with A | B for T, the
|
|
62284
62276
|
// result is (A extends U ? X : Y) | (B extends U ? X : Y).
|
|
62285
62277
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ?
|
|
62286
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62278
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62287
62279
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
62288
62280
|
root.instantiations.set(id, result);
|
|
62289
62281
|
}
|
|
@@ -65026,8 +65018,9 @@ var ts;
|
|
|
65026
65018
|
// This ensures the subtype relationship is ordered, and preventing declaration order
|
|
65027
65019
|
// from deciding which type "wins" in union subtype reduction.
|
|
65028
65020
|
// They're still assignable to one another, since `readonly` doesn't affect assignability.
|
|
65029
|
-
|
|
65030
|
-
|
|
65021
|
+
// This is only applied during the strictSubtypeRelation -- currently used in subtype reduction
|
|
65022
|
+
if (relation === strictSubtypeRelation &&
|
|
65023
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
65031
65024
|
return 0 /* False */;
|
|
65032
65025
|
}
|
|
65033
65026
|
// If the target comes from a partial union prop, allow `undefined` in the target type
|
|
@@ -160491,7 +160484,7 @@ var ts;
|
|
|
160491
160484
|
var isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
160492
160485
|
var text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
160493
160486
|
var rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : "");
|
|
160494
|
-
return ts.factory.createTemplateSpan(span.expression, isLast
|
|
160487
|
+
return ts.factory.createTemplateSpan(span.expression, isLast && isLastSpan
|
|
160495
160488
|
? ts.factory.createTemplateTail(text, rawText)
|
|
160496
160489
|
: ts.factory.createTemplateMiddle(text, rawText));
|
|
160497
160490
|
});
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220301";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -31571,18 +31571,8 @@ var ts;
|
|
|
31571
31571
|
if (tryParseSemicolon()) {
|
|
31572
31572
|
return;
|
|
31573
31573
|
}
|
|
31574
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31575
|
-
// we generally know there was an error already reported in the initializer...
|
|
31576
|
-
// class Example { a = new Map([), ) }
|
|
31577
|
-
// ~
|
|
31578
31574
|
if (initializer) {
|
|
31579
|
-
|
|
31580
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31581
|
-
// class Example { a = 0 {} }
|
|
31582
|
-
// ~
|
|
31583
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31584
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31585
|
-
}
|
|
31575
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31586
31576
|
return;
|
|
31587
31577
|
}
|
|
31588
31578
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -38519,11 +38509,13 @@ var ts;
|
|
|
38519
38509
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
38520
38510
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
38521
38511
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
38512
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
38522
38513
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
38523
38514
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
38524
38515
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
38525
38516
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
38526
38517
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
38518
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
38527
38519
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
38528
38520
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
38529
38521
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -62477,7 +62469,7 @@ var ts;
|
|
|
62477
62469
|
// distributive conditional type T extends U ? X : Y is instantiated with A | B for T, the
|
|
62478
62470
|
// result is (A extends U ? X : Y) | (B extends U ? X : Y).
|
|
62479
62471
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ?
|
|
62480
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62472
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62481
62473
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
62482
62474
|
root.instantiations.set(id, result);
|
|
62483
62475
|
}
|
|
@@ -65220,8 +65212,9 @@ var ts;
|
|
|
65220
65212
|
// This ensures the subtype relationship is ordered, and preventing declaration order
|
|
65221
65213
|
// from deciding which type "wins" in union subtype reduction.
|
|
65222
65214
|
// They're still assignable to one another, since `readonly` doesn't affect assignability.
|
|
65223
|
-
|
|
65224
|
-
|
|
65215
|
+
// This is only applied during the strictSubtypeRelation -- currently used in subtype reduction
|
|
65216
|
+
if (relation === strictSubtypeRelation &&
|
|
65217
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
65225
65218
|
return 0 /* False */;
|
|
65226
65219
|
}
|
|
65227
65220
|
// If the target comes from a partial union prop, allow `undefined` in the target type
|
|
@@ -161102,7 +161095,7 @@ var ts;
|
|
|
161102
161095
|
var isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
161103
161096
|
var text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
161104
161097
|
var rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : "");
|
|
161105
|
-
return ts.factory.createTemplateSpan(span.expression, isLast
|
|
161098
|
+
return ts.factory.createTemplateSpan(span.expression, isLast && isLastSpan
|
|
161106
161099
|
? ts.factory.createTemplateTail(text, rawText)
|
|
161107
161100
|
: ts.factory.createTemplateMiddle(text, rawText));
|
|
161108
161101
|
});
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220301";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -31571,18 +31571,8 @@ var ts;
|
|
|
31571
31571
|
if (tryParseSemicolon()) {
|
|
31572
31572
|
return;
|
|
31573
31573
|
}
|
|
31574
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31575
|
-
// we generally know there was an error already reported in the initializer...
|
|
31576
|
-
// class Example { a = new Map([), ) }
|
|
31577
|
-
// ~
|
|
31578
31574
|
if (initializer) {
|
|
31579
|
-
|
|
31580
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31581
|
-
// class Example { a = 0 {} }
|
|
31582
|
-
// ~
|
|
31583
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31584
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31585
|
-
}
|
|
31575
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31586
31576
|
return;
|
|
31587
31577
|
}
|
|
31588
31578
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -38519,11 +38509,13 @@ var ts;
|
|
|
38519
38509
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
38520
38510
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
38521
38511
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
38512
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
38522
38513
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
38523
38514
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
38524
38515
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
38525
38516
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
38526
38517
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
38518
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
38527
38519
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
38528
38520
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
38529
38521
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -62477,7 +62469,7 @@ var ts;
|
|
|
62477
62469
|
// distributive conditional type T extends U ? X : Y is instantiated with A | B for T, the
|
|
62478
62470
|
// result is (A extends U ? X : Y) | (B extends U ? X : Y).
|
|
62479
62471
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ?
|
|
62480
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62472
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62481
62473
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
62482
62474
|
root.instantiations.set(id, result);
|
|
62483
62475
|
}
|
|
@@ -65220,8 +65212,9 @@ var ts;
|
|
|
65220
65212
|
// This ensures the subtype relationship is ordered, and preventing declaration order
|
|
65221
65213
|
// from deciding which type "wins" in union subtype reduction.
|
|
65222
65214
|
// They're still assignable to one another, since `readonly` doesn't affect assignability.
|
|
65223
|
-
|
|
65224
|
-
|
|
65215
|
+
// This is only applied during the strictSubtypeRelation -- currently used in subtype reduction
|
|
65216
|
+
if (relation === strictSubtypeRelation &&
|
|
65217
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
65225
65218
|
return 0 /* False */;
|
|
65226
65219
|
}
|
|
65227
65220
|
// If the target comes from a partial union prop, allow `undefined` in the target type
|
|
@@ -161102,7 +161095,7 @@ var ts;
|
|
|
161102
161095
|
var isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
161103
161096
|
var text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
161104
161097
|
var rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : "");
|
|
161105
|
-
return ts.factory.createTemplateSpan(span.expression, isLast
|
|
161098
|
+
return ts.factory.createTemplateSpan(span.expression, isLast && isLastSpan
|
|
161106
161099
|
? ts.factory.createTemplateTail(text, rawText)
|
|
161107
161100
|
: ts.factory.createTemplateMiddle(text, rawText));
|
|
161108
161101
|
});
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220301";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -31571,18 +31571,8 @@ var ts;
|
|
|
31571
31571
|
if (tryParseSemicolon()) {
|
|
31572
31572
|
return;
|
|
31573
31573
|
}
|
|
31574
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31575
|
-
// we generally know there was an error already reported in the initializer...
|
|
31576
|
-
// class Example { a = new Map([), ) }
|
|
31577
|
-
// ~
|
|
31578
31574
|
if (initializer) {
|
|
31579
|
-
|
|
31580
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31581
|
-
// class Example { a = 0 {} }
|
|
31582
|
-
// ~
|
|
31583
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31584
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31585
|
-
}
|
|
31575
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31586
31576
|
return;
|
|
31587
31577
|
}
|
|
31588
31578
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -38519,11 +38509,13 @@ var ts;
|
|
|
38519
38509
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
38520
38510
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
38521
38511
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
38512
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
38522
38513
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
38523
38514
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
38524
38515
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
38525
38516
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
38526
38517
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
38518
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
38527
38519
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
38528
38520
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
38529
38521
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -62477,7 +62469,7 @@ var ts;
|
|
|
62477
62469
|
// distributive conditional type T extends U ? X : Y is instantiated with A | B for T, the
|
|
62478
62470
|
// result is (A extends U ? X : Y) | (B extends U ? X : Y).
|
|
62479
62471
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ?
|
|
62480
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62472
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62481
62473
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
62482
62474
|
root.instantiations.set(id, result);
|
|
62483
62475
|
}
|
|
@@ -65220,8 +65212,9 @@ var ts;
|
|
|
65220
65212
|
// This ensures the subtype relationship is ordered, and preventing declaration order
|
|
65221
65213
|
// from deciding which type "wins" in union subtype reduction.
|
|
65222
65214
|
// They're still assignable to one another, since `readonly` doesn't affect assignability.
|
|
65223
|
-
|
|
65224
|
-
|
|
65215
|
+
// This is only applied during the strictSubtypeRelation -- currently used in subtype reduction
|
|
65216
|
+
if (relation === strictSubtypeRelation &&
|
|
65217
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
65225
65218
|
return 0 /* False */;
|
|
65226
65219
|
}
|
|
65227
65220
|
// If the target comes from a partial union prop, allow `undefined` in the target type
|
|
@@ -161102,7 +161095,7 @@ var ts;
|
|
|
161102
161095
|
var isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
161103
161096
|
var text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
161104
161097
|
var rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : "");
|
|
161105
|
-
return ts.factory.createTemplateSpan(span.expression, isLast
|
|
161098
|
+
return ts.factory.createTemplateSpan(span.expression, isLast && isLastSpan
|
|
161106
161099
|
? ts.factory.createTemplateTail(text, rawText)
|
|
161107
161100
|
: ts.factory.createTemplateMiddle(text, rawText));
|
|
161108
161101
|
});
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220301";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -31366,18 +31366,8 @@ var ts;
|
|
|
31366
31366
|
if (tryParseSemicolon()) {
|
|
31367
31367
|
return;
|
|
31368
31368
|
}
|
|
31369
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31370
|
-
// we generally know there was an error already reported in the initializer...
|
|
31371
|
-
// class Example { a = new Map([), ) }
|
|
31372
|
-
// ~
|
|
31373
31369
|
if (initializer) {
|
|
31374
|
-
|
|
31375
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31376
|
-
// class Example { a = 0 {} }
|
|
31377
|
-
// ~
|
|
31378
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31379
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31380
|
-
}
|
|
31370
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31381
31371
|
return;
|
|
31382
31372
|
}
|
|
31383
31373
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -38314,11 +38304,13 @@ var ts;
|
|
|
38314
38304
|
["es2019.string", "lib.es2019.string.d.ts"],
|
|
38315
38305
|
["es2019.symbol", "lib.es2019.symbol.d.ts"],
|
|
38316
38306
|
["es2020.bigint", "lib.es2020.bigint.d.ts"],
|
|
38307
|
+
["es2020.date", "lib.es2020.date.d.ts"],
|
|
38317
38308
|
["es2020.promise", "lib.es2020.promise.d.ts"],
|
|
38318
38309
|
["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"],
|
|
38319
38310
|
["es2020.string", "lib.es2020.string.d.ts"],
|
|
38320
38311
|
["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
|
|
38321
38312
|
["es2020.intl", "lib.es2020.intl.d.ts"],
|
|
38313
|
+
["es2020.number", "lib.es2020.number.d.ts"],
|
|
38322
38314
|
["es2021.promise", "lib.es2021.promise.d.ts"],
|
|
38323
38315
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
38324
38316
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
@@ -62272,7 +62264,7 @@ var ts;
|
|
|
62272
62264
|
// distributive conditional type T extends U ? X : Y is instantiated with A | B for T, the
|
|
62273
62265
|
// result is (A extends U ? X : Y) | (B extends U ? X : Y).
|
|
62274
62266
|
result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ?
|
|
62275
|
-
mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62267
|
+
mapTypeWithAlias(getReducedType(distributionType), function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
|
|
62276
62268
|
getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
|
|
62277
62269
|
root.instantiations.set(id, result);
|
|
62278
62270
|
}
|
|
@@ -65015,8 +65007,9 @@ var ts;
|
|
|
65015
65007
|
// This ensures the subtype relationship is ordered, and preventing declaration order
|
|
65016
65008
|
// from deciding which type "wins" in union subtype reduction.
|
|
65017
65009
|
// They're still assignable to one another, since `readonly` doesn't affect assignability.
|
|
65018
|
-
|
|
65019
|
-
|
|
65010
|
+
// This is only applied during the strictSubtypeRelation -- currently used in subtype reduction
|
|
65011
|
+
if (relation === strictSubtypeRelation &&
|
|
65012
|
+
isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
|
|
65020
65013
|
return 0 /* False */;
|
|
65021
65014
|
}
|
|
65022
65015
|
// If the target comes from a partial union prop, allow `undefined` in the target type
|
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": "4.7.0-dev.
|
|
5
|
+
"version": "4.7.0-dev.20220301",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|