Skip to content

Commit 486f0c1

Browse files
Bump version to 4.2.2 and LKG
1 parent 2b34f0a commit 486f0c1

8 files changed

+99
-266
lines changed

lib/lib.es2020.intl.d.ts

+2-235
Original file line numberDiff line numberDiff line change
@@ -74,239 +74,6 @@ declare namespace Intl {
7474
*/
7575
type RelativeTimeFormatStyle = "long" | "short" | "narrow";
7676

77-
/**
78-
* Unicode Calendar Identifier
79-
*
80-
* [Reference](http://unicode.org/reports/tr35/#UnicodeCalendarIdentifier)
81-
*
82-
* [Source](https://github.com/unicode-org/cldr/blob/b805d0b/common/bcp47/calendar.xml)
83-
*/
84-
type Calendar =
85-
// Thai Buddhist calendar
86-
| "buddhist"
87-
// Traditional Chinese calendar
88-
| "chinese"
89-
// Coptic calendar
90-
| "coptic"
91-
// Traditional Korean calendar
92-
| "dangi"
93-
// Ethiopic calendar, Amete Alem (epoch approx. 5493 B.C.E)
94-
| "ethiopic-amete-alem" | "ethioaa"
95-
// Ethiopic calendar, Amete Mihret (epoch approx, 8 C.E.)
96-
| "ethiopic"
97-
// Gregorian calendar
98-
| "gregorian"
99-
// Gregorian calendar (alias)
100-
| "gregory"
101-
// Traditional Hebrew calendar
102-
| "hebrew"
103-
// Indian calendar
104-
| "indian"
105-
// Islamic calendar
106-
| "islamic"
107-
// Islamic calendar, Umm al-Qura
108-
| "islamic-umalqura"
109-
// Islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - astronomical epoch)
110-
| "islamic-tbla"
111-
// Islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - civil epoch)
112-
| "islamic-civil"
113-
| "islamicc" // Deprecated alias
114-
// Islamic calendar, Saudi Arabia sighting
115-
| "islamic-rgsa"
116-
// ISO calendar (Gregorian calendar using the ISO 8601 calendar week rules)
117-
| "iso8601"
118-
// Japanese Imperial calendar
119-
| "japanese"
120-
// Persian calendar
121-
| "persian"
122-
// Republic of China calendar
123-
| "roc"
124-
;
125-
126-
/**
127-
* Unicode Number System Identifier
128-
*
129-
* [Reference](http://unicode.org/reports/tr35/#UnicodeNumberSystemIdentifier)
130-
*
131-
* [Source](https://github.com/unicode-org/cldr/blob/be7a953/common/bcp47/number.xml)
132-
*/
133-
type NumberingSystem =
134-
// Adlam digits
135-
| "adlm"
136-
// Ahom digits
137-
| "ahom"
138-
// Arabic-Indic digits
139-
| "arab"
140-
// Extended Arabic-Indic digits
141-
| "arabext"
142-
// Armenian upper case numerals — algorithmic
143-
| "armn"
144-
// Armenian lower case numerals — algorithmic
145-
| "armnlow"
146-
// Balinese digits
147-
| "bali"
148-
// Bengali digits
149-
| "beng"
150-
// Bhaiksuki digits
151-
| "bhks"
152-
// Brahmi digits
153-
| "brah"
154-
// Chakma digits
155-
| "cakm"
156-
// Cham digits
157-
| "cham"
158-
// Cyrillic numerals — algorithmic
159-
| "cyrl"
160-
// Devanagari digits
161-
| "deva"
162-
// Dives Akuru digits
163-
| "diak"
164-
// Ethiopic numerals — algorithmic
165-
| "ethi"
166-
// Financial numerals — may be algorithmic
167-
| "finance"
168-
// Full width digits
169-
| "fullwide"
170-
// Georgian numerals — algorithmic
171-
| "geor"
172-
// Gunjala Gondi digits
173-
| "gong"
174-
// Masaram Gondi digits
175-
| "gonm"
176-
// Greek upper case numerals — algorithmic
177-
| "grek"
178-
// Greek lower case numerals — algorithmic
179-
| "greklow"
180-
// Gujarati digits
181-
| "gujr"
182-
// Gurmukhi digits
183-
| "guru"
184-
// Han-character day-of-month numbering for lunar/other traditional calendars"
185-
| "hanidays"
186-
// Positional decimal system using Chinese number ideographs as digits
187-
| "hanidec"
188-
// Simplified Chinese numerals — algorithmic
189-
| "hans"
190-
// Simplified Chinese financial numerals — algorithmic
191-
| "hansfin"
192-
// Traditional Chinese numerals — algorithmic
193-
| "hant"
194-
// Traditional Chinese financial numerals — algorithmic
195-
| "hantfin"
196-
// Hebrew numerals — algorithmic
197-
| "hebr"
198-
// Pahawh Hmong digits
199-
| "hmng"
200-
// Nyiakeng Puachue Hmong digits
201-
| "hmnp"
202-
// Javanese digits
203-
| "java"
204-
// Japanese numerals — algorithmic
205-
| "jpan"
206-
// Japanese financial numerals — algorithmic
207-
| "jpanfin"
208-
// Japanese first-year Gannen numbering for Japanese calendar
209-
| "jpanyear"
210-
// Kayah Li digits
211-
| "kali"
212-
// Khmer digits
213-
| "khmr"
214-
// Kannada digits
215-
| "knda"
216-
// Tai Tham Hora (secular) digits
217-
| "lana"
218-
// Tai Tham Tham (ecclesiastical) digits
219-
| "lanatham"
220-
// Lao digits
221-
| "laoo"
222-
// Latin digits
223-
| "latn"
224-
// Lepcha digits
225-
| "lepc"
226-
// Limbu digits
227-
| "limb"
228-
// Mathematical bold digits
229-
| "mathbold"
230-
// Mathematical double-struck digits
231-
| "mathdbl"
232-
// Mathematical monospace digits
233-
| "mathmono"
234-
// Mathematical sans-serif bold digits
235-
| "mathsanb"
236-
// Mathematical sans-serif digits
237-
| "mathsans"
238-
// Malayalam digits
239-
| "mlym"
240-
// Modi digits
241-
| "modi"
242-
// Mongolian digits
243-
| "mong"
244-
// Mro digits
245-
| "mroo"
246-
// Meetei Mayek digits
247-
| "mtei"
248-
// Myanmar digits
249-
| "mymr"
250-
// Myanmar Shan digits
251-
| "mymrshan"
252-
// Myanmar Tai Laing digits
253-
| "mymrtlng"
254-
// Native digits
255-
| "native"
256-
// Newa digits
257-
| "newa"
258-
// N'Ko digits
259-
| "nkoo"
260-
// Ol Chiki digits
261-
| "olck"
262-
// Oriya digits
263-
| "orya"
264-
// Osmanya digits
265-
| "osma"
266-
// Hanifi Rohingya digits
267-
| "rohg"
268-
// Roman upper case numerals — algorithmic
269-
| "roman"
270-
// Roman lowercase numerals — algorithmic
271-
| "romanlow"
272-
// Saurashtra digits
273-
| "saur"
274-
// Sharada digits
275-
| "shrd"
276-
// Khudawadi digits
277-
| "sind"
278-
// Sinhala Lith digits
279-
| "sinh"
280-
// Sora_Sompeng digits
281-
| "sora"
282-
// Sundanese digits
283-
| "sund"
284-
// Takri digits
285-
| "takr"
286-
// New Tai Lue digits
287-
| "talu"
288-
// Tamil numerals — algorithmic
289-
| "taml"
290-
// Modern Tamil decimal digits
291-
| "tamldec"
292-
// Telugu digits
293-
| "telu"
294-
// Thai digits
295-
| "thai"
296-
// Tirhuta digits
297-
| "tirh"
298-
// Tibetan digits
299-
| "tibt"
300-
// Traditional numerals — may be algorithmic
301-
| "traditional" | "traditio"
302-
// Vai digits
303-
| "vaii"
304-
// Warang Citi digits
305-
| "wara"
306-
// Wancho digits
307-
| "wcho"
308-
;
309-
31077
/**
31178
* An object with some or all of properties of `options` parameter
31279
* of `Intl.RelativeTimeFormat` constructor.
@@ -534,9 +301,9 @@ declare namespace Intl {
534301
interface DateTimeFormatOptions {
535302
dateStyle?: "full" | "long" | "medium" | "short";
536303
timeStyle?: "full" | "long" | "medium" | "short";
537-
calendar?: Calendar;
304+
calendar?: string;
538305
dayPeriod?: "narrow" | "short" | "long";
539-
numberingSystem?: NumberingSystem;
306+
numberingSystem?: string;
540307
hourCycle?: "h11" | "h12" | "h23" | "h24";
541308
fractionalSecondDigits?: 0 | 1 | 2 | 3;
542309
}

lib/tsc.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -46050,7 +46050,7 @@ var ts;
4605046050
}
4605146051
return true;
4605246052
}
46053-
function removeRedundantLiteralTypes(types, includes) {
46053+
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
4605446054
var i = types.length;
4605546055
while (i > 0) {
4605646056
i--;
@@ -46060,7 +46060,7 @@ var ts;
4606046060
flags & 256 && includes & 8 ||
4606146061
flags & 2048 && includes & 64 ||
4606246062
flags & 8192 && includes & 4096 ||
46063-
flags & 32768 && includes & 16384 ||
46063+
reduceVoidUndefined && flags & 32768 && includes & 16384 ||
4606446064
isFreshLiteralType(t) && containsType(types, t.regularType);
4606546065
if (remove) {
4606646066
ts.orderedRemoveItemAt(types, i);
@@ -46121,7 +46121,7 @@ var ts;
4612146121
}
4612246122
if (unionReduction & (1 | 2)) {
4612346123
if (includes & (2944 | 8192) || includes & 16384 && includes & 32768) {
46124-
removeRedundantLiteralTypes(typeSet, includes);
46124+
removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2));
4612546125
}
4612646126
if (includes & 128 && includes & 134217728) {
4612746127
removeStringLiteralsMatchedByTemplateLiterals(typeSet);
@@ -53172,7 +53172,16 @@ var ts;
5317253172
var type = getTypeOfDottedName(node.expression, diagnostic);
5317353173
if (type) {
5317453174
var name = node.name;
53175-
var prop = getPropertyOfType(type, ts.isPrivateIdentifier(name) ? ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText) : name.escapedText);
53175+
var prop = void 0;
53176+
if (ts.isPrivateIdentifier(name)) {
53177+
if (!type.symbol) {
53178+
return undefined;
53179+
}
53180+
prop = getPropertyOfType(type, ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText));
53181+
}
53182+
else {
53183+
prop = getPropertyOfType(type, name.escapedText);
53184+
}
5317653185
return prop && getExplicitTypeOfSymbol(prop, diagnostic);
5317753186
}
5317853187
return undefined;
@@ -62908,7 +62917,9 @@ var ts;
6290862917
: ts.isPropertyAccessExpression(location) ? location.name
6290962918
: ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
6291062919
: undefined;
62911-
if (!testedNode) {
62920+
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location)
62921+
&& ts.isAssertionExpression(ts.skipParentheses(location.expression));
62922+
if (!testedNode || isPropertyExpressionCast) {
6291262923
return;
6291362924
}
6291462925
var possiblyFalsy = getFalsyFlags(type);

lib/tsserver.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -55677,7 +55677,7 @@ var ts;
5567755677
}
5567855678
return true;
5567955679
}
55680-
function removeRedundantLiteralTypes(types, includes) {
55680+
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
5568155681
var i = types.length;
5568255682
while (i > 0) {
5568355683
i--;
@@ -55687,7 +55687,7 @@ var ts;
5568755687
flags & 256 /* NumberLiteral */ && includes & 8 /* Number */ ||
5568855688
flags & 2048 /* BigIntLiteral */ && includes & 64 /* BigInt */ ||
5568955689
flags & 8192 /* UniqueESSymbol */ && includes & 4096 /* ESSymbol */ ||
55690-
flags & 32768 /* Undefined */ && includes & 16384 /* Void */ ||
55690+
reduceVoidUndefined && flags & 32768 /* Undefined */ && includes & 16384 /* Void */ ||
5569155691
isFreshLiteralType(t) && containsType(types, t.regularType);
5569255692
if (remove) {
5569355693
ts.orderedRemoveItemAt(types, i);
@@ -55755,7 +55755,7 @@ var ts;
5575555755
}
5575655756
if (unionReduction & (1 /* Literal */ | 2 /* Subtype */)) {
5575755757
if (includes & (2944 /* Literal */ | 8192 /* UniqueESSymbol */) || includes & 16384 /* Void */ && includes & 32768 /* Undefined */) {
55758-
removeRedundantLiteralTypes(typeSet, includes);
55758+
removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2 /* Subtype */));
5575955759
}
5576055760
if (includes & 128 /* StringLiteral */ && includes & 134217728 /* TemplateLiteral */) {
5576155761
removeStringLiteralsMatchedByTemplateLiterals(typeSet);
@@ -63776,7 +63776,16 @@ var ts;
6377663776
var type = getTypeOfDottedName(node.expression, diagnostic);
6377763777
if (type) {
6377863778
var name = node.name;
63779-
var prop = getPropertyOfType(type, ts.isPrivateIdentifier(name) ? ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText) : name.escapedText);
63779+
var prop = void 0;
63780+
if (ts.isPrivateIdentifier(name)) {
63781+
if (!type.symbol) {
63782+
return undefined;
63783+
}
63784+
prop = getPropertyOfType(type, ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText));
63785+
}
63786+
else {
63787+
prop = getPropertyOfType(type, name.escapedText);
63788+
}
6378063789
return prop && getExplicitTypeOfSymbol(prop, diagnostic);
6378163790
}
6378263791
return undefined;
@@ -75193,7 +75202,9 @@ var ts;
7519375202
: ts.isPropertyAccessExpression(location) ? location.name
7519475203
: ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
7519575204
: undefined;
75196-
if (!testedNode) {
75205+
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location)
75206+
&& ts.isAssertionExpression(ts.skipParentheses(location.expression));
75207+
if (!testedNode || isPropertyExpressionCast) {
7519775208
return;
7519875209
}
7519975210
var possiblyFalsy = getFalsyFlags(type);

0 commit comments

Comments
 (0)