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

4037 - IsPalindrome #32257

Open
vangie opened this issue Feb 17, 2024 · 0 comments
Open

4037 - IsPalindrome #32257

vangie opened this issue Feb 17, 2024 · 0 comments
Labels
4037 answer Share answers/solutions to a question en in English

Comments

@vangie
Copy link

vangie commented Feb 17, 2024

type IsPalindrome<T extends number | string> =
  `${T}` extends `${infer L}${infer R}`
    ? R extends `${infer S}${L}`
      ? S extends '' ? true : IsPalindrome<S>
      : R extends '' ? true : false
    : never
@vangie vangie added answer Share answers/solutions to a question en in English labels Feb 17, 2024
@github-actions github-actions bot added the 4037 label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4037 answer Share answers/solutions to a question en in English
Projects
None yet
Development

No branches or pull requests

1 participant