Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intl.ListFormat still shows error with target ES2021 #50381

Closed
blessanm86 opened this issue Aug 20, 2022 · 2 comments
Closed

Intl.ListFormat still shows error with target ES2021 #50381

blessanm86 opened this issue Aug 20, 2022 · 2 comments

Comments

@blessanm86
Copy link

Bug Report

I am still getting errors that ListFormat types are not available. I followed this #46907 and set the target as ES2021 and still doesn't work.

🔎 Search Terms

TS2339: Property 'ListFormat' does not exist on type 'typeof Intl'

🕗 Version & Regression Information

I tested with version 4.6.2 and also tried with the latest version and include a link below

⏯ Playground Link

Playground link with relevant code

💻 Code

const emphasizedList = new Intl.ListFormat('en', {
    style: 'long',
    type: 'conjunction',
}).format(['a','b']);

🙁 Actual behavior

Type information is not available

🙂 Expected behavior

Intl api types should be available when tartget is set to ES2021

@MartinJohns
Copy link
Contributor

I tested with version 4.6.2 and also tried with the latest version and include a link below

The changes were added in 4.7, and your link to the playground is set to ES2017. Change the target to the correct ES version and it works.

@blessanm86
Copy link
Author

Thanks @MartinJohns that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants