question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[i18n] Intl getCanonicalLocales / RelativeTimeFormat / ListFormat > 2339 error

See original GitHub issue

TypeScript Version: 3.2.2

Search Terms: Intl.getCanonicalLocales TS TypeScript Error 2339 undefined i18n

Code

Intl.getCanonicalLocales('EN-US');

Expected behavior: Code works, and returns [“en-US”] https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Intl/getCanonicalLocales

Actual behavior: TS Error 2339, the property getCanonicalLocales does not exists on Intl

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
alex-kinokoncommented, Sep 17, 2020

It is now stage 4.

4reactions
dtruffautcommented, Dec 23, 2018

Same thing with

Code

new Intl.ListFormat('en');

Expected behavior: Code works https://developers.google.com/web/updates/2018/12/intl-listformat

Actual behavior: TS Error 2339, the property ListFormat does not exists on Intl

Read more comments on GitHub >

github_iconTop Results From Across the Web

Property 'RelativeTimeFormat' does not exist on type 'typeof Intl'
ts:2:24 - error TS2339: Property 'RelativeTimeFormat' does not exist on type 'typeof Intl'. 2 const rtf = new Intl.RelativeTimeFormat("en", { ...
Read more >
Intl.getCanonicalLocales() - JavaScript - MDN Web Docs
The Intl.getCanonicalLocales() static method returns an array containing the canonical locale names. Duplicates will be omitted and elements will be ...
Read more >
Property 'Relativetimeformat' Does Not Exist On ... - ADocLib
[i18n] Intl getCanonicalLocales / RelativeTimeFormat / ListFormat 2339 TS Error 2339 the property ListFormat does not exists on Intl.
Read more >
@formatjs/intl-getcanonicallocales - npm
We've migrated the docs to https://formatjs.io/docs/polyfills/intl-getcanonicallocales/. Keywords. intl · locale · formatjs · react-intl · i18n ...
Read more >
NEWS · master · GNOME / gjs - GitLab
Gnome-Shell 42 - crash after login (general protection fault) [#479, !740, ... + Intl.RelativeTimeFormat is useful for formatting time ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found