Bump version to 4.2.2 and LKG

This commit is contained in:
TypeScript Bot 2021-02-20 00:22:10 +00:00
parent 2b34f0ac7b
commit 486f0c142e
8 changed files with 99 additions and 266 deletions

View file

@ -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.
@ -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;
}

View file

@ -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--;
@ -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);
@ -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);
@ -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;
@ -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);

View file

@ -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--;
@ -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);
@ -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);
@ -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;
@ -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);

View file

@ -55871,7 +55871,7 @@ var ts;
}
return true;
}
function removeRedundantLiteralTypes(types, includes) {
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
var i = types.length;
while (i > 0) {
i--;
@ -55881,7 +55881,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);
@ -55949,7 +55949,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);
@ -63970,7 +63970,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;
@ -75387,7 +75396,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);

View file

@ -55871,7 +55871,7 @@ var ts;
}
return true;
}
function removeRedundantLiteralTypes(types, includes) {
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
var i = types.length;
while (i > 0) {
i--;
@ -55881,7 +55881,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);
@ -55949,7 +55949,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);
@ -63970,7 +63970,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;
@ -75387,7 +75396,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);

View file

@ -55871,7 +55871,7 @@ var ts;
}
return true;
}
function removeRedundantLiteralTypes(types, includes) {
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
var i = types.length;
while (i > 0) {
i--;
@ -55881,7 +55881,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);
@ -55949,7 +55949,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);
@ -63970,7 +63970,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;
@ -75387,7 +75396,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);

View file

@ -55666,7 +55666,7 @@ var ts;
}
return true;
}
function removeRedundantLiteralTypes(types, includes) {
function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
var i = types.length;
while (i > 0) {
i--;
@ -55676,7 +55676,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);
@ -55744,7 +55744,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);
@ -63765,7 +63765,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;
@ -75182,7 +75191,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);

View file

@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "4.2.1-rc",
"version": "4.2.2",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [