Skip to content

TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'. #551

Closed
@AchoArnold

Description

@AchoArnold

Describe the bug
I can't compile a nuxt.js type script project which uses the DisplayNames of Intl I get the error message TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'.

To Reproduce
Steps to reproduce the behavior:

  • Add this script to any nuxt.js typescript project
new Intl.DisplayNames(undefined, { type: 'region' })

Expected behavior
The code should compile to javascript

Instead, I get the error

TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'.

Additional context

Activity

rchl

rchl commented on Mar 13, 2023

@rchl
Collaborator

Intl.DisplayNames was not supported in Typescript 4.2 that was pinned until now.

It will work from the next release which will include #563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rchl@AchoArnold

        Issue actions

          TS2339: Property 'DisplayNames' does not exist on type 'typeof Intl'. · Issue #551 · nuxt/typescript