⚙ Compilation target
esnext
⚙ Library
lib.es2020.intl.d.ts
Missing / Incorrect Definition
|
(locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules; |
makes Intl.PluralRules callable without
new, but this is not the case according to the Intl specification (step 1 of
https://tc39.es/ecma402/#sec-intl.pluralrules).
Sample Code
Intl.PluralRules('en')
Intl.DurationFormat('en')
Intl.DateTimeFormat('en')
TSC produces an error on line 2, but it should also produce the same error on line 1. It should _not_ produce an error on line 3, since DateTimeFormat has the legacy behaviour of being callable without `new`.
Documentation Link
https://tc39.es/ecma402/#sec-intl.pluralrules
⚙ Compilation target
esnext
⚙ Library
lib.es2020.intl.d.ts
Missing / Incorrect Definition
TypeScript/src/lib/es2020.intl.d.ts
Line 452 in 637d574
new, but this is not the case according to the Intl specification (step 1 of https://tc39.es/ecma402/#sec-intl.pluralrules).Sample Code
Documentation Link
https://tc39.es/ecma402/#sec-intl.pluralrules