Skip to content

Commit

Permalink
Bump version to 4.2.2 and LKG
Browse files Browse the repository at this point in the history
  • Loading branch information
typescript-bot committed Feb 20, 2021
1 parent 2b34f0a commit 486f0c1
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 266 deletions.
237 changes: 2 additions & 235 deletions lib/lib.es2020.intl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,239 +74,6 @@ declare namespace Intl {
*/
type RelativeTimeFormatStyle = "long" | "short" | "narrow";

/**
* Unicode Calendar Identifier
*
* [Reference](http://unicode.org/reports/tr35/#UnicodeCalendarIdentifier)
*
* [Source](https://github.com/unicode-org/cldr/blob/b805d0b/common/bcp47/calendar.xml)
*/
type Calendar =
// Thai Buddhist calendar
| "buddhist"
// Traditional Chinese calendar
| "chinese"
// Coptic calendar
| "coptic"
// Traditional Korean calendar
| "dangi"
// Ethiopic calendar, Amete Alem (epoch approx. 5493 B.C.E)
| "ethiopic-amete-alem" | "ethioaa"
// Ethiopic calendar, Amete Mihret (epoch approx, 8 C.E.)
| "ethiopic"
// Gregorian calendar
| "gregorian"
// Gregorian calendar (alias)
| "gregory"
// Traditional Hebrew calendar
| "hebrew"
// Indian calendar
| "indian"
// Islamic calendar
| "islamic"
// Islamic calendar, Umm al-Qura
| "islamic-umalqura"
// Islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - astronomical epoch)
| "islamic-tbla"
// Islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - civil epoch)
| "islamic-civil"
| "islamicc" // Deprecated alias
// Islamic calendar, Saudi Arabia sighting
| "islamic-rgsa"
// ISO calendar (Gregorian calendar using the ISO 8601 calendar week rules)
| "iso8601"
// Japanese Imperial calendar
| "japanese"
// Persian calendar
| "persian"
// Republic of China calendar
| "roc"
;

/**
* Unicode Number System Identifier
*
* [Reference](http://unicode.org/reports/tr35/#UnicodeNumberSystemIdentifier)
*
* [Source](https://github.com/unicode-org/cldr/blob/be7a953/common/bcp47/number.xml)
*/
type NumberingSystem =
// Adlam digits
| "adlm"
// Ahom digits
| "ahom"
// Arabic-Indic digits
| "arab"
// Extended Arabic-Indic digits
| "arabext"
// Armenian upper case numerals — algorithmic
| "armn"
// Armenian lower case numerals — algorithmic
| "armnlow"
// Balinese digits
| "bali"
// Bengali digits
| "beng"
// Bhaiksuki digits
| "bhks"
// Brahmi digits
| "brah"
// Chakma digits
| "cakm"
// Cham digits
| "cham"
// Cyrillic numerals — algorithmic
| "cyrl"
// Devanagari digits
| "deva"
// Dives Akuru digits
| "diak"
// Ethiopic numerals — algorithmic
| "ethi"
// Financial numerals — may be algorithmic
| "finance"
// Full width digits
| "fullwide"
// Georgian numerals — algorithmic
| "geor"
// Gunjala Gondi digits
| "gong"
// Masaram Gondi digits
| "gonm"
// Greek upper case numerals — algorithmic
| "grek"
// Greek lower case numerals — algorithmic
| "greklow"
// Gujarati digits
| "gujr"
// Gurmukhi digits
| "guru"
// Han-character day-of-month numbering for lunar/other traditional calendars"
| "hanidays"
// Positional decimal system using Chinese number ideographs as digits
| "hanidec"
// Simplified Chinese numerals — algorithmic
| "hans"
// Simplified Chinese financial numerals — algorithmic
| "hansfin"
// Traditional Chinese numerals — algorithmic
| "hant"
// Traditional Chinese financial numerals — algorithmic
| "hantfin"
// Hebrew numerals — algorithmic
| "hebr"
// Pahawh Hmong digits
| "hmng"
// Nyiakeng Puachue Hmong digits
| "hmnp"
// Javanese digits
| "java"
// Japanese numerals — algorithmic
| "jpan"
// Japanese financial numerals — algorithmic
| "jpanfin"
// Japanese first-year Gannen numbering for Japanese calendar
| "jpanyear"
// Kayah Li digits
| "kali"
// Khmer digits
| "khmr"
// Kannada digits
| "knda"
// Tai Tham Hora (secular) digits
| "lana"
// Tai Tham Tham (ecclesiastical) digits
| "lanatham"
// Lao digits
| "laoo"
// Latin digits
| "latn"
// Lepcha digits
| "lepc"
// Limbu digits
| "limb"
// Mathematical bold digits
| "mathbold"
// Mathematical double-struck digits
| "mathdbl"
// Mathematical monospace digits
| "mathmono"
// Mathematical sans-serif bold digits
| "mathsanb"
// Mathematical sans-serif digits
| "mathsans"
// Malayalam digits
| "mlym"
// Modi digits
| "modi"
// Mongolian digits
| "mong"
// Mro digits
| "mroo"
// Meetei Mayek digits
| "mtei"
// Myanmar digits
| "mymr"
// Myanmar Shan digits
| "mymrshan"
// Myanmar Tai Laing digits
| "mymrtlng"
// Native digits
| "native"
// Newa digits
| "newa"
// N'Ko digits
| "nkoo"
// Ol Chiki digits
| "olck"
// Oriya digits
| "orya"
// Osmanya digits
| "osma"
// Hanifi Rohingya digits
| "rohg"
// Roman upper case numerals — algorithmic
| "roman"
// Roman lowercase numerals — algorithmic
| "romanlow"
// Saurashtra digits
| "saur"
// Sharada digits
| "shrd"
// Khudawadi digits
| "sind"
// Sinhala Lith digits
| "sinh"
// Sora_Sompeng digits
| "sora"
// Sundanese digits
| "sund"
// Takri digits
| "takr"
// New Tai Lue digits
| "talu"
// Tamil numerals — algorithmic
| "taml"
// Modern Tamil decimal digits
| "tamldec"
// Telugu digits
| "telu"
// Thai digits
| "thai"
// Tirhuta digits
| "tirh"
// Tibetan digits
| "tibt"
// Traditional numerals — may be algorithmic
| "traditional" | "traditio"
// Vai digits
| "vaii"
// Warang Citi digits
| "wara"
// Wancho digits
| "wcho"
;

/**
* An object with some or all of properties of `options` parameter
* of `Intl.RelativeTimeFormat` constructor.
Expand Down Expand Up @@ -534,9 +301,9 @@ declare namespace Intl {
interface DateTimeFormatOptions {
dateStyle?: "full" | "long" | "medium" | "short";
timeStyle?: "full" | "long" | "medium" | "short";
calendar?: Calendar;
calendar?: string;
dayPeriod?: "narrow" | "short" | "long";
numberingSystem?: NumberingSystem;
numberingSystem?: string;
hourCycle?: "h11" | "h12" | "h23" | "h24";
fractionalSecondDigits?: 0 | 1 | 2 | 3;
}
Expand Down
21 changes: 16 additions & 5 deletions lib/tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46050,7 +46050,7 @@ var ts;
}
return true;
}
function removeRedundantLiteralTypes(types, includes) {
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
var i = types.length;
while (i > 0) {
i--;
Expand All @@ -46060,7 +46060,7 @@ var ts;
flags & 256 && includes & 8 ||
flags & 2048 && includes & 64 ||
flags & 8192 && includes & 4096 ||
flags & 32768 && includes & 16384 ||
reduceVoidUndefined && flags & 32768 && includes & 16384 ||
isFreshLiteralType(t) && containsType(types, t.regularType);
if (remove) {
ts.orderedRemoveItemAt(types, i);
Expand Down Expand Up @@ -46121,7 +46121,7 @@ var ts;
}
if (unionReduction & (1 | 2)) {
if (includes & (2944 | 8192) || includes & 16384 && includes & 32768) {
removeRedundantLiteralTypes(typeSet, includes);
removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2));
}
if (includes & 128 && includes & 134217728) {
removeStringLiteralsMatchedByTemplateLiterals(typeSet);
Expand Down Expand Up @@ -53172,7 +53172,16 @@ var ts;
var type = getTypeOfDottedName(node.expression, diagnostic);
if (type) {
var name = node.name;
var prop = getPropertyOfType(type, ts.isPrivateIdentifier(name) ? ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText) : name.escapedText);
var prop = void 0;
if (ts.isPrivateIdentifier(name)) {
if (!type.symbol) {
return undefined;
}
prop = getPropertyOfType(type, ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText));
}
else {
prop = getPropertyOfType(type, name.escapedText);
}
return prop && getExplicitTypeOfSymbol(prop, diagnostic);
}
return undefined;
Expand Down Expand Up @@ -62908,7 +62917,9 @@ var ts;
: ts.isPropertyAccessExpression(location) ? location.name
: ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
: undefined;
if (!testedNode) {
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location)
&& ts.isAssertionExpression(ts.skipParentheses(location.expression));
if (!testedNode || isPropertyExpressionCast) {
return;
}
var possiblyFalsy = getFalsyFlags(type);
Expand Down
21 changes: 16 additions & 5 deletions lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -55677,7 +55677,7 @@ var ts;
}
return true;
}
function removeRedundantLiteralTypes(types, includes) {
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
var i = types.length;
while (i > 0) {
i--;
Expand All @@ -55687,7 +55687,7 @@ var ts;
flags & 256 /* NumberLiteral */ && includes & 8 /* Number */ ||
flags & 2048 /* BigIntLiteral */ && includes & 64 /* BigInt */ ||
flags & 8192 /* UniqueESSymbol */ && includes & 4096 /* ESSymbol */ ||
flags & 32768 /* Undefined */ && includes & 16384 /* Void */ ||
reduceVoidUndefined && flags & 32768 /* Undefined */ && includes & 16384 /* Void */ ||
isFreshLiteralType(t) && containsType(types, t.regularType);
if (remove) {
ts.orderedRemoveItemAt(types, i);
Expand Down Expand Up @@ -55755,7 +55755,7 @@ var ts;
}
if (unionReduction & (1 /* Literal */ | 2 /* Subtype */)) {
if (includes & (2944 /* Literal */ | 8192 /* UniqueESSymbol */) || includes & 16384 /* Void */ && includes & 32768 /* Undefined */) {
removeRedundantLiteralTypes(typeSet, includes);
removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2 /* Subtype */));
}
if (includes & 128 /* StringLiteral */ && includes & 134217728 /* TemplateLiteral */) {
removeStringLiteralsMatchedByTemplateLiterals(typeSet);
Expand Down Expand Up @@ -63776,7 +63776,16 @@ var ts;
var type = getTypeOfDottedName(node.expression, diagnostic);
if (type) {
var name = node.name;
var prop = getPropertyOfType(type, ts.isPrivateIdentifier(name) ? ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText) : name.escapedText);
var prop = void 0;
if (ts.isPrivateIdentifier(name)) {
if (!type.symbol) {
return undefined;
}
prop = getPropertyOfType(type, ts.getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText));
}
else {
prop = getPropertyOfType(type, name.escapedText);
}
return prop && getExplicitTypeOfSymbol(prop, diagnostic);
}
return undefined;
Expand Down Expand Up @@ -75193,7 +75202,9 @@ var ts;
: ts.isPropertyAccessExpression(location) ? location.name
: ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
: undefined;
if (!testedNode) {
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location)
&& ts.isAssertionExpression(ts.skipParentheses(location.expression));
if (!testedNode || isPropertyExpressionCast) {
return;
}
var possiblyFalsy = getFalsyFlags(type);
Expand Down
Loading

0 comments on commit 486f0c1

Please sign in to comment.