Skip to content
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

IfxxxLiteral (eg IfBooleanLiteral) are missing (only the IsxxxLiteral is present #892

Open
anodynos opened this issue Jun 13, 2024 · 0 comments

Comments

@anodynos
Copy link

anodynos commented Jun 13, 2024

I'm not sure if it's intentional, they seem very useful to me and missing them is inconsistent & also not complying with docs

I guess its as simple as:

export type IfBooleanLiteral<T, Then = true, Else = false> =
  IsBooleanLiteral<T> extends true ? Then : Else

export type IfStringLiteral<T, Then = true, Else = false> =
  IsStringLiteral<T> extends true ? Then : Else

export type IfNumericLiteral<T, Then = true, Else = false> =
  IsNumericLiteral<T> extends true ? Then : Else

Please let me know if you'd like PR and where you'd think it's best to place 'em.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants