-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
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'])
sroucheray, Alexsey, networkException, ryota-ka, sdgluck and 6 more
Metadata
Metadata
Assignees
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript