Add `Intl.supportedValuesOf` enumeration to `lib.*.intl.d.ts` as support in Node.js18, and v8, and various browsers exists
See original GitHub issuelib Update Request
Configuration Check
My compilation target is ES2022
and my lib is "esnext.intl", "es2021.intl", "ESNext","ES2022", "ES2021", "es6"
.
Missing / Incorrect Definition
The static method Intl.supportedValuesOf
is supported by Node.js since v18 release from April. This is missing in the definition of Intl
.
Sample Code
Intl.supportedValuesOf("timeZone").forEach(function(timeZone) {
console.log(timeZone);
});
Documentation Link
Ecmascript - it is listed as a stage3 proposal, but given that it is already implemented in v8 & mentioned in the MDN this seems reasonable.
Issue Analytics
- State:
- Created a year ago
- Reactions:14
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Intl.supportedValuesOf() - JavaScript - MDN Web Docs
The Intl.supportedValuesOf() static method returns an array containing the supported calendar, collation, currency, numbering systems, ...
Read more >Intl.supportedValuesOf polyfill for React - Stack Overflow
I was using Intl.supportedValuesOf however, I noticed a fewer list of browsers that support it. I searched on NPM for a Polyfill but...
Read more >polyfill-intl-enumeration - npm
Simple and clean way to use Intl.supportedValuesOf in Node.js and Browser.; Zero production dependencies; Easy to use and great test ...
Read more >Mocha - the fun, simple, flexible JavaScript test framework
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.
Read more >11 Features in Node.js 18 you need to try - NodeSource
Details of Node.js 18 new features, including fetch API and test runner, along with V8 JavaScript engine 10.1 features, and more...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a temporary solution, I extended the existing type declaration
Also available in Node.js LTS (18.18.0):