Skip to content

source property is missing from return type of Intl formatRangeToParts methods #48753

Closed
@devongovett

Description

@devongovett

Bug Report

The source property is missing on the returned parts from the formatRangeToParts method of Intl.DateTimeFormat and Intl.NumberFormat. See for example https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatRangeToParts.

🔎 Search Terms

formatRangeToParts

🕗 Version & Regression Information

all

⏯ Playground Link

I can't get the playground to use es2021 as the target. It just reverts back to ES3.

💻 Code

let formatter = new Intl.DateTimeFormat('en-US');
formatter.formatRangeToParts(new Date(), new Date())[0].source

🙁 Actual behavior

Error, source does not exist

🙂 Expected behavior

No error, source exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions