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

IsStringLiteral should be false for branded and tagged types #885

Closed
cjquines opened this issue Jun 5, 2024 · 0 comments · Fixed by #886
Closed

IsStringLiteral should be false for branded and tagged types #885

cjquines opened this issue Jun 5, 2024 · 0 comments · Fixed by #886

Comments

@cjquines
Copy link
Contributor

cjquines commented Jun 5, 2024

i would expect these to return false, as these are not string literals

import type {IsStringLiteral, Tagged} from 'type-fest';

type A = IsStringLiteral<Tagged<string, "UserId">>; // true
type B = IsStringLiteral<string & { _type: "UserId" }>; // true

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
@cjquines cjquines changed the title IsStringLiteral is true for branded and tagged types IsStringLiteral should be false for branded and tagged types Jun 5, 2024
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 a pull request may close this issue.

1 participant