Guest User

Untitled

a guest
Jan 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. type Increment<T extends number, Tuple extends any[] = [any]> =
  2. T extends 0 ? 1 :
  3. T extends 1 ? 2 :
  4. T extends TupleUnshift<any, Tuple> ?
  5. TupleUnshift<any, TupleUnshift<any, Tuple>>['length'] :
  6. Increment<TupleUnshift<any, TupleUnshift<any, Tuple>>>
Add Comment
Please, Sign In to add comment