Open
Description
Thanks for writing this great book. I'm new to TypeScript and I'm enjoying working through it.
I noticed that the answer to Chapter 4 Exercise 5 has the function signature:
function is<T>(a: T, ...b: [T, ...T[]]): boolean
However, when I was attempting it on my own, I came up with:
function is<T>(a: T, ...b: T[]): boolean
which also seems to work. It looks like there's also an open PR (#8) with the signature:
function is<T>(a: T, ...b: [...T[]]): boolean
What's the difference, if any, between these different generic types?
Metadata
Metadata
Assignees
Labels
No labels