File: es2018IntlAPIs.types

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (35 lines) | stat: -rw-r--r-- 2,210 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
=== tests/cases/conformance/es2018/es2018IntlAPIs.ts ===
// Sample from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/supportedLocalesOf
const locales = ['ban', 'id-u-co-pinyin', 'de-ID'];
>locales : string[]
>['ban', 'id-u-co-pinyin', 'de-ID'] : string[]
>'ban' : "ban"
>'id-u-co-pinyin' : "id-u-co-pinyin"
>'de-ID' : "de-ID"

const options = { localeMatcher: 'lookup' } as const;
>options : { readonly localeMatcher: "lookup"; }
>{ localeMatcher: 'lookup' } as const : { readonly localeMatcher: "lookup"; }
>{ localeMatcher: 'lookup' } : { readonly localeMatcher: "lookup"; }
>localeMatcher : "lookup"
>'lookup' : "lookup"

console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', '));
>console.log(Intl.PluralRules.supportedLocalesOf(locales, options).join(', ')) : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>Intl.PluralRules.supportedLocalesOf(locales, options).join(', ') : string
>Intl.PluralRules.supportedLocalesOf(locales, options).join : (separator?: string) => string
>Intl.PluralRules.supportedLocalesOf(locales, options) : string[]
>Intl.PluralRules.supportedLocalesOf : (locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }) => string[]
>Intl.PluralRules : { (locales?: string | string[], options?: Intl.PluralRulesOptions): Intl.PluralRules; new (locales?: string | string[], options?: Intl.PluralRulesOptions): Intl.PluralRules; supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; }
>Intl : typeof Intl
>PluralRules : { (locales?: string | string[], options?: Intl.PluralRulesOptions): Intl.PluralRules; new (locales?: string | string[], options?: Intl.PluralRulesOptions): Intl.PluralRules; supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[]; }
>supportedLocalesOf : (locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }) => string[]
>locales : string[]
>options : { readonly localeMatcher: "lookup"; }
>join : (separator?: string) => string
>', ' : ", "