Skip to content

step: T in global.d.ts #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 8, 2024
Merged

step: T in global.d.ts #73

merged 3 commits into from
Dec 8, 2024

Conversation

Rudxain
Copy link
Contributor

@Rudxain Rudxain commented Dec 6, 2024

  • NumericRangeOptions's step is no longer number | number (simplifies to number), it is now T which makes use of the (previously unused) type parameter
  • specifies TS version, for reproducibility. Not anymore, because of lib conflicts

@Rudxain Rudxain marked this pull request as ready for review December 6, 2024 01:27
@Rudxain
Copy link
Contributor Author

Rudxain commented Dec 6, 2024

BTW, I also considered microsoft/TypeScript#31752, but that's hacky and it forces API consumers to define a custom type-guard such as:

type PInfinity = 1e999
const is_pinf = (x: unknown): x is PInfinity => x === Infinity

And the Infinity type in global.d.ts would have to be changed to:

type PInfinity = 1e999
type NInfinity = -1e999
type Inf = PInfinity | NInfinity

This reverts commit 6795fd9.
@Rudxain Rudxain changed the title step: T and TS version step: T in global.d.ts Dec 8, 2024
@Rudxain Rudxain changed the title step: T in global.d.ts step: T in global.d.ts Dec 8, 2024
@Jack-Works Jack-Works merged commit 0006fe0 into tc39:main Dec 8, 2024
@Jack-Works
Copy link
Member

thank you!

@Rudxain Rudxain deleted the num-type branch December 8, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants