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
Will work on small numbers only, due to TS error 'Type instantiation is excessively deep and possibly infinite'
type Pop<T extends any[]> = T extends [...infer head, any] ? head : never; type MinusOne<T extends number, A extends any[] = []> = A['length'] extends T ? Pop<A>['length'] : MinusOne<T, [...A, 0]>
The text was updated successfully, but these errors were encountered:
Thanks! Seems to be the next best thing after #13507.
Sorry, something went wrong.
Is this something people can think of ?
666
good!
I am too stupid to understand this code. Nice code but doesn't work on all cases.
No branches or pull requests
Will work on small numbers only, due to TS error 'Type instantiation is excessively deep and possibly infinite'
The text was updated successfully, but these errors were encountered: