We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type Reverse<T extends string> = T extends `${infer First}${infer Rest}` ? `${Reverse<Rest>}${First}` : T type IsPalindrome<T extends string | number> = `${T}` extends Reverse<`${T}`> ? true : false
playground
The text was updated successfully, but these errors were encountered:
Here is a tupple version solution which is easier to match the pattern match idea
#20480
Sorry, something went wrong.
No branches or pull requests
playground
The text was updated successfully, but these errors were encountered: