You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type 'Tail<T>' does not satisfy the constraint 'Tuple'.
Type 'unknown[] | []' is not assignable to type 'readonly string[]'.
Type 'unknown[]' is not assignable to type 'readonly string[]'.
Type 'Tail<[head, ...tail] & readonly string[]>' is not assignable to type 'readonly string[]'.
Type 'unknown[] | []' is not assignable to type 'readonly string[]'.
Type 'unknown[]' is not assignable to type 'readonly string[]'.
Type 'unknown' is not assignable to type 'string'.
Activity
m-b-davis commentedon Feb 9, 2021
Nice!
earshinov commentedon Jun 21, 2021
I wonder why changing the condition in
Joinintomakes TypeScript complain
🤔
uid11 commentedon Jun 21, 2021
Because in this case, TypeScript cannot prove that
Tail<T>always returnsTuple.This can be fixed by forcing the result of
Tail<T>to be aTuple(TS Playground):