/third_party/typescript/tests/baselines/reference/ |
D | es2020IntlAPIs.types | 2 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_ide… 18 >console.log( `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).f… 23 `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}` 24 >`${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}` :… 25 >new Intl.DateTimeFormat(locale).format(date) : string 26 >new Intl.DateTimeFormat(locale).format : (date?: number | Date) => string 27 >new Intl.DateTimeFormat(locale) : Intl.DateTimeFormat 28 …Intl.DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.… 29 >Intl : typeof Intl 30 …Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl… [all …]
|
D | DateTimeFormatAndNumberFormatES2021.types | 2 Intl.NumberFormat.prototype.formatRange 3 >Intl.NumberFormat.prototype.formatRange : any 4 >Intl.NumberFormat.prototype : Intl.NumberFormat 5 …Intl.NumberFormat : { (locales?: string | string[], options?: Intl.NumberFormatOptions): Intl.Numb… 6 >Intl : typeof Intl 7 …Intl.NumberFormatOptions): Intl.NumberFormat; new (locales?: string | string[], options?: Intl.Num… 8 >prototype : Intl.NumberFormat 11 Intl.DateTimeFormat.prototype.formatRange 12 >Intl.DateTimeFormat.prototype.formatRange : (startDate: number | bigint | Date, endDate: number | … 13 >Intl.DateTimeFormat.prototype : Intl.DateTimeFormat [all …]
|
D | localesObjectArgument.types | 2 const enUS = new Intl.Locale("en-US"); 3 >enUS : Intl.Locale 4 >new Intl.Locale("en-US") : Intl.Locale 5 >Intl.Locale : new (tag: string | Intl.Locale, options?: Intl.LocaleOptions) => Intl.Locale 6 >Intl : typeof Intl 7 >Locale : new (tag: string | Intl.Locale, options?: Intl.LocaleOptions) => Intl.Locale 10 const deDE = new Intl.Locale("de-DE"); 11 >deDE : Intl.Locale 12 >new Intl.Locale("de-DE") : Intl.Locale 13 >Intl.Locale : new (tag: string | Intl.Locale, options?: Intl.LocaleOptions) => Intl.Locale [all …]
|
D | formatToPartsBigInt.types | 2 // Intl.NumberFormat.formatToParts should support bigInt 4 // Test Intl methods with new parameter type 5 new Intl.NumberFormat("fr").formatToParts(3000n); 6 >new Intl.NumberFormat("fr").formatToParts(3000n) : Intl.NumberFormatPart[] 7 >new Intl.NumberFormat("fr").formatToParts : (number?: number | bigint) => Intl.NumberFormatPart[] 8 >new Intl.NumberFormat("fr") : Intl.NumberFormat 9 …Intl.NumberFormat : { (locales?: string | string[], options?: Intl.NumberFormatOptions): Intl.Numb… 10 >Intl : typeof Intl 11 …Intl.NumberFormatOptions): Intl.NumberFormat; new (locales?: string | string[], options?: Intl.Num… 13 >formatToParts : (number?: number | bigint) => Intl.NumberFormatPart[] [all …]
|
D | formatToPartsFractionalSecond.types | 2 new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') 3 >new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') : Intl.Da… 4 …Intl.DateTimeFormat().formatToParts().find : { <S extends Intl.DateTimeFormatPart>(predicate: (thi… 5 >new Intl.DateTimeFormat().formatToParts() : Intl.DateTimeFormatPart[] 6 >new Intl.DateTimeFormat().formatToParts : (date?: number | Date) => Intl.DateTimeFormatPart[] 7 >new Intl.DateTimeFormat() : Intl.DateTimeFormat 8 …Intl.DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.… 9 >Intl : typeof Intl 10 …Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl… 11 >formatToParts : (date?: number | Date) => Intl.DateTimeFormatPart[] [all …]
|
D | es2020IntlAPIs.js | 8 `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}` 19 const rtf1 = new Intl.RelativeTimeFormat('en', { style: 'narrow' }); 27 const rtf2 = new Intl.RelativeTimeFormat('es', { numeric: 'auto' }); 33 const regionNamesInEnglish = new Intl.DisplayNames(['en'], { type: 'region' }); 34 const regionNamesInTraditionalChinese = new Intl.DisplayNames(['zh-Hant'], { type: 'region' }); 44 console.log(Intl.DisplayNames.supportedLocalesOf(locales1, options1).join(', ')); 46 new Intl.Locale(); // should error 47 new Intl.Locale(new Intl.Locale('en-US')); 49 new Intl.DisplayNames(); // TypeError: invalid_argument 50 new Intl.DisplayNames('en'); // TypeError: invalid_argument [all …]
|
D | numberFormatCurrencySignResolved.types | 2 const options = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: … 3 >options : Intl.ResolvedNumberFormatOptions 4 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 5 …Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' }).res… 6 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 7 …Intl.NumberFormat : { (locales?: string | string[] | undefined, options?: Intl.NumberFormatOptions… 8 >Intl : typeof Intl 9 …Intl.NumberFormatOptions | undefined): Intl.NumberFormat; new (locales?: string | string[] | undef… 18 >resolvedOptions : { (): Intl.ResolvedNumberFormatOptions; (): Intl.ResolvedNumberFormatOptions; } 23 >options : Intl.ResolvedNumberFormatOptions
|
D | es2020IntlAPIs.symbols | 2 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_ide… 19 `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}` 20 >new Intl.DateTimeFormat(locale).format : Symbol(Intl.DateTimeFormat.format, Decl(lib.es5.d.ts, --,… 21 >Intl.DateTimeFormat : Symbol(Intl.DateTimeFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, -… 22 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… 23 >DateTimeFormat : Symbol(Intl.DateTimeFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --… 25 >format : Symbol(Intl.DateTimeFormat.format, Decl(lib.es5.d.ts, --, --)) 27 >new Intl.NumberFormat(locale).format : Symbol(Intl.NumberFormat.format, Decl(lib.es5.d.ts, --, --)… 28 >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, -… 29 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… [all …]
|
D | DateTimeFormatAndNumberFormatES2021.symbols | 2 Intl.NumberFormat.prototype.formatRange 3 >Intl.NumberFormat.prototype : Symbol(prototype, Decl(lib.es5.d.ts, --, --)) 4 >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, -… 5 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… 6 >NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), D… 9 Intl.DateTimeFormat.prototype.formatRange 10 >Intl.DateTimeFormat.prototype.formatRange : Symbol(Intl.DateTimeFormat.formatRange, Decl(lib.es202… 11 >Intl.DateTimeFormat.prototype : Symbol(prototype, Decl(lib.es5.d.ts, --, --)) 12 >Intl.DateTimeFormat : Symbol(Intl.DateTimeFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, -… 13 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… [all …]
|
D | doYouNeedToChangeYourTargetLibraryES2016Plus.types | 53 const testIntlFormatToParts = new Intl.DateTimeFormat("en-US").formatToParts(); 55 >new Intl.DateTimeFormat("en-US").formatToParts() : any 56 >new Intl.DateTimeFormat("en-US").formatToParts : any 57 >new Intl.DateTimeFormat("en-US") : Intl.DateTimeFormat 58 …Intl.DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.… 59 >Intl : typeof Intl 60 …Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl… 118 const testIntlPluralRules = new Intl.PluralRules("ar-EG").select(0); 120 >new Intl.PluralRules("ar-EG").select(0) : any 121 >new Intl.PluralRules("ar-EG").select : any [all …]
|
D | numberFormatCurrencySign.types | 2 const str = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'acc… 4 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 5 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 6 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 7 …Intl.NumberFormat : { (locales?: string | string[] | undefined, options?: Intl.NumberFormatOptions… 8 >Intl : typeof Intl 9 …Intl.NumberFormatOptions | undefined): Intl.NumberFormat; new (locales?: string | string[] | undef…
|
D | es2022IntlAPIs.types | 2 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFo… 18 var formatter = new Intl.DateTimeFormat('en-US', { 19 >formatter : Intl.DateTimeFormat 20 >new Intl.DateTimeFormat('en-US', { timeZone: 'America/Los_Angeles', timeZoneName: zoneName, … 21 …Intl.DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.… 22 >Intl : typeof Intl 23 …Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl…
|
D | DateTimeFormatAndNumberFormatES2021.js | 2 Intl.NumberFormat.prototype.formatRange 3 Intl.DateTimeFormat.prototype.formatRange 5 new Intl.NumberFormat().formatRange 6 new Intl.NumberFormat().formatRangeToParts 7 new Intl.DateTimeFormat().formatRange 8 new Intl.DateTimeFormat().formatRangeToParts 11 Intl.NumberFormat.prototype.formatRange; 12 Intl.DateTimeFormat.prototype.formatRange; 13 new Intl.NumberFormat().formatRange; 14 new Intl.NumberFormat().formatRangeToParts; [all …]
|
D | es2018IntlAPIs.types | 3 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRule… 18 console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', ')); 19 >console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', ')) : void 23 >Intl.PluralRules.supportedLocalesOf(locales, options).join(', ') : string 24 >Intl.PluralRules.supportedLocalesOf(locales, options).join : (separator?: string) => string 25 >Intl.PluralRules.supportedLocalesOf(locales, options) : string[] 26 >Intl.PluralRules.supportedLocalesOf : (locales: string | string[], options?: { localeMatcher?: "lo… 27 …Intl.PluralRules : { (locales?: string | string[], options?: Intl.PluralRulesOptions): Intl.Plural… 28 >Intl : typeof Intl 29 …ing[], options?: Intl.PluralRulesOptions): Intl.PluralRules; new (locales?: string | string[], opt…
|
D | formatToPartsBigInt.symbols | 2 // Intl.NumberFormat.formatToParts should support bigInt 4 // Test Intl methods with new parameter type 5 new Intl.NumberFormat("fr").formatToParts(3000n); 6 >new Intl.NumberFormat("fr").formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es201… 7 >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, -… 8 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… 9 >NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), D… 10 >formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es2018.intl.d.ts, --, --)) 12 new Intl.NumberFormat("fr").formatToParts(BigInt(123)); 13 >new Intl.NumberFormat("fr").formatToParts : Symbol(Intl.NumberFormat.formatToParts, Decl(lib.es201… [all …]
|
D | es2020IntlAPIs.errors.txt | 9 …// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_id… 15 … `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}` 25 …// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeT… 26 const rtf1 = new Intl.RelativeTimeFormat('en', { style: 'narrow' }); 34 const rtf2 = new Intl.RelativeTimeFormat('es', { numeric: 'auto' }); 39 …// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNa… 40 const regionNamesInEnglish = new Intl.DisplayNames(['en'], { type: 'region' }); 41 const regionNamesInTraditionalChinese = new Intl.DisplayNames(['zh-Hant'], { type: 'region' }); 51 console.log(Intl.DisplayNames.supportedLocalesOf(locales1, options1).join(', ')); 53 new Intl.Locale(); // should error [all …]
|
D | bigintWithLib.types | 69 >bigintVal.toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions)… 71 >toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions) => string 77 >bigintVal.toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions)… 79 >toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions) => string 86 >bigintVal.toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions)… 88 >toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions) => string 98 >bigintVal.toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions)… 100 >toLocaleString : (locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions) => string 388 // Test Intl methods with new parameter type 389 new Intl.NumberFormat("fr").format(3000n); [all …]
|
D | bigintWithoutLib.types | 372 // Test Intl methods with new parameter type 373 new Intl.NumberFormat("fr").format(3000n); 374 >new Intl.NumberFormat("fr").format(3000n) : string 375 >new Intl.NumberFormat("fr").format : (value: number) => string 376 >new Intl.NumberFormat("fr") : Intl.NumberFormat 377 …Intl.NumberFormat : { (locales?: string | string[], options?: Intl.NumberFormatOptions): Intl.Numb… 378 >Intl : typeof Intl 379 …Intl.NumberFormatOptions): Intl.NumberFormat; new (locales?: string | string[], options?: Intl.Num… 384 new Intl.NumberFormat("fr").format(bigintVal); 385 >new Intl.NumberFormat("fr").format(bigintVal) : string [all …]
|
D | formatToPartsFractionalSecond.symbols | 2 new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') 3 >new Intl.DateTimeFormat().formatToParts().find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --,… 4 >new Intl.DateTimeFormat().formatToParts : Symbol(Intl.DateTimeFormat.formatToParts, Decl(lib.es201… 5 >Intl.DateTimeFormat : Symbol(Intl.DateTimeFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, -… 6 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… 7 >DateTimeFormat : Symbol(Intl.DateTimeFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --… 8 >formatToParts : Symbol(Intl.DateTimeFormat.formatToParts, Decl(lib.es2017.intl.d.ts, --, --)) 11 >val.type : Symbol(Intl.DateTimeFormatPart.type, Decl(lib.es2017.intl.d.ts, --, --)) 13 >type : Symbol(Intl.DateTimeFormatPart.type, Decl(lib.es2017.intl.d.ts, --, --))
|
D | numberFormatCurrencySignResolved.symbols | 2 const options = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: … 4 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 5 >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, -… 6 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… 7 >NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), D… 11 >resolvedOptions : Symbol(Intl.NumberFormat.resolvedOptions, Decl(lib.es5.d.ts, --, --), Decl(lib.e… 15 >options.currencySign : Symbol(Intl.ResolvedNumberFormatOptions.currencySign, Decl(lib.es2020.intl.… 17 >currencySign : Symbol(Intl.ResolvedNumberFormatOptions.currencySign, Decl(lib.es2020.intl.d.ts, --…
|
D | numberFormatCurrencySign.symbols | 2 const str = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'acc… 4 >new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' })… 5 >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, -… 6 >Intl : Symbol(Intl, Decl(lib.es5.d.ts, --, --), Decl(lib.es2017.intl.d.ts, --, --), Decl(lib.es201… 7 >NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), D… 11 >format : Symbol(Intl.NumberFormat.format, Decl(lib.es5.d.ts, --, --), Decl(lib.es2020.bigint.d.ts,…
|
/third_party/typescript/tests/cases/conformance/es2020/ |
D | es2020IntlAPIs.ts | 9 `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)}` 20 const rtf1 = new Intl.RelativeTimeFormat('en', { style: 'narrow' }); 28 const rtf2 = new Intl.RelativeTimeFormat('es', { numeric: 'auto' }); 34 const regionNamesInEnglish = new Intl.DisplayNames(['en'], { type: 'region' }); 35 const regionNamesInTraditionalChinese = new Intl.DisplayNames(['zh-Hant'], { type: 'region' }); 45 console.log(Intl.DisplayNames.supportedLocalesOf(locales1, options1).join(', ')); 47 new Intl.Locale(); // should error 48 new Intl.Locale(new Intl.Locale('en-US')); 50 new Intl.DisplayNames(); // TypeError: invalid_argument 51 new Intl.DisplayNames('en'); // TypeError: invalid_argument [all …]
|
/third_party/typescript/tests/cases/compiler/ |
D | DateTimeFormatAndNumberFormatES2021.ts | 2 Intl.NumberFormat.prototype.formatRange 3 Intl.DateTimeFormat.prototype.formatRange 5 new Intl.NumberFormat().formatRange 6 new Intl.NumberFormat().formatRangeToParts 7 new Intl.DateTimeFormat().formatRange 8 new Intl.DateTimeFormat().formatRangeToParts
|
/third_party/typescript/lib/ |
D | lib.es2020.date.d.ts | 29 toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; 36 … toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; 43 … toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
/third_party/typescript/src/lib/ |
D | es2020.date.d.ts | 9 toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; 16 … toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; 23 … toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|