# Bug Report Based on the MDN documentation resolvedOptions of DisplayNames (and all other intl apis) should contain a `locale` property https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions ### 🔎 Search Terms Intl.DisplayNamesOptions resolvedOptions locale ### 🕗 Version & Regression Information 4.5.2 - I was unable to test this on prior versions because these types only became available in 4.5.2 ### ⏯ Playground Link [Playground link with relevant code](https://www.typescriptlang.org/play?target=7&ts=4.6.0-dev.20211117#code/PTAEGEHsAcEsFMAmoBmAnSBbUALALntAM4BcIi8AbvADYzxoB0mkAXrDTQIaORoDmweADsAtAFUAysESQAxkWAB1eACNgAKS6UukuWljQ8wAErwUDEXPjAA4nVVcaAfQDyqgFbw5eRQElhPBpgABFYImhuAE8AOS5MeEU0RMgaakRXI1hIYSIAKDy5HKI8UERwyK5Y+MTQAF5QYXgAd1AAoMYwiOi4hKIACgBtAHIKURCAUWGAXQAaUABvPCjoeBJQYeT+bOFhgF8ASgBuAqLc0oBXIiRMvB2ierKKnpqiRmSiVPTb+-7jwuKqXgjDo-H6VxuWWKIPkTngx1AiJAoAARGNJiiAbkgTCwRCMlDcowSlEaPCjoikWAUXRhPxMWdPmTceDrgS7tDlqsEZTQMiUVsdgzAczQazIRyiSgnDRHHIANYI-lFCiYoA) ### 💻 Code ```ts // Copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions const displayNames = new Intl.DisplayNames(['de-DE'], {type: 'region'}); const usedOptions = displayNames.resolvedOptions(); console.log(usedOptions.locale); // "de-DE" console.log(usedOptions.style); // "long" console.log(usedOptions.type); // "region" console.log(usedOptions.fallback); // "code" ``` ### 🙁 Actual behavior `console.log(usedOptions.locale);` has a typing error Property 'locale' does not exist on type 'DisplayNamesOptions'.(2339) ### 🙂 Expected behavior No type error because MDN's documentation seems to be correct across all browsers which support Intl.
Activity
gfyoung commentedon Dec 18, 2021
Ryan Cavanaugh (@RyanCavanaugh) Orta Therox (@orta):
This issue is related to #45647 as well.
I saw you guys closed #47143 a few days ago and added it to the next release.
Could this issue (and PR) also be reviewed and included as well?
fix(46845): Add missing "locale" field to Intl.DisplayNamesOptions (#…