Skip to content

Add Intl.ListFormat to es2021 libΒ #46907

Closed
@vhfmag

Description

@vhfmag

Suggestion

πŸ” Search Terms

  • Intl.ListFormat
  • Intl
  • ListFormat

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Add Intl.ListFormat to es2021 lib types (as per Finished Proposals).

Bringing this API to Typescript has been directly suggested before, but didn't follow the issue templates (#46866), and was also mentioned before (#45646 (comment), #29129 (comment)), but, as I couldn't find any specific active issue where the feature suggestion is being considered, I'm opening this issue.

πŸ“ƒ Motivating Example

Code that uses the Intl.ListFormat API should not fail type checking:

new Intl.ListFormat('bg', {type: 'conjunction'}).format(['a','b','c'])
new Intl.ListFormat('bg', {type: 'disjunction'}).formatToParts(['a','b','c'])

πŸ’» Use Cases

new Intl.ListFormat('bg', {type: 'conjunction'}).format(['a','b','c'])
new Intl.ListFormat('bg', {type: 'disjunction'}).formatToParts(['a','b','c'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    CommittedThe team has roadmapped this issueDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions