Missing Intl.Locale.prototype.getWeekInfo()
⚙ Compilation target
esnext
⚙ Library
ESNext
Missing / Incorrect Definition
Intl.Locale.prototype.getWeekInfo() of the Intl Locale Info API is missing.
The method is available in multiple major browsers as well as in Node.js since v18.
Sample Code
const enUS = new Intl.Locale("en-US");
console.log(enUS.getWeekInfo());
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo
There's also this related PR that's been on hold https://github.com/microsoft/TypeScript/pull/58084
Any updates on this issue or in the related pull request? As I've seen, the latest update on the mentioned pull request is from 2024.
Note that Firefox does not support this function, so it's not safe to use in modern web. You can track the implementation in their issue tracker.