Skip to content

Intl.DisplayNames missing #41338

Closed
Closed
@MichalBryxi

Description

@MichalBryxi

Search Terms: Intl.DisplayNames, "Property 'DisplayNames' does not exist on type 'typeof Intl'."

Code

let languageNames = new Intl.DisplayNames(['en'], { type: 'language' });

Expected behavior: TS knows DisplayNames and does appropriate type checking.

Actual behavior: TS displays error: Property 'DisplayNames' does not exist on type 'typeof Intl'.

Playground Link: https://www.typescriptlang.org/play?ts=4.1.0-dev.20201030#code/DYUwLgBMCGB2DmBXa8QDloFsQGcIF4JYQB3CASVjGADoARASxwAcYBPDbHACgG0ByELH4BdADQQA3hDBtmIAFwR+MBMlT8IAXwCUAbgBQECEA
Related Issues: N/A

Respective MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames
Respective TC39: https://tc39.es/proposal-intl-displaynames/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions