Skip to content

Comments

discrete pluralizer for lib.esnext.temporal unit unions#63190

Open
Renegade334 wants to merge 1 commit intomicrosoft:mainfrom
Renegade334:lib-esnext-temporal-unit-plurality
Open

discrete pluralizer for lib.esnext.temporal unit unions#63190
Renegade334 wants to merge 1 commit intomicrosoft:mainfrom
Renegade334:lib-esnext-temporal-unit-plurality

Conversation

@Renegade334
Copy link
Contributor

For improved interoperability, makes DateUnit and TimeUnit equivalent to their js-temporal counterparts by restricting the unions to singular nouns and using a pluralizer helper where applicable.

@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Feb 24, 2026
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 24, 2026
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point to the type that this is becoming compatible with?

Seems fine, but want to understand.

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Feb 24, 2026
@Renegade334
Copy link
Contributor Author

Can you point to the type that this is becoming compatible with?

Sure: https://github.com/js-temporal/temporal-polyfill/blob/83a63b1cf082202375bc5bae800cc95bb179d8ab/index.d.ts#L136-L137

@jakebailey
Copy link
Member

Ah, but the mapped type doesn't exist?

@Renegade334
Copy link
Contributor Author

Renegade334 commented Feb 24, 2026

Not in that specific form; they've used a T | PluralUnit<T> union wherever plurals appear, although there is no place where plurals appear on their own, hence the consolidated helper here. The bikeshed remains open 🚲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Needs merge

Development

Successfully merging this pull request may close these issues.

3 participants