const isType = <T>(type: string) => (obj: unknown): obj is T => toString.call(obj) === `[object ${type}]`
I know it's a function about judging types, but it uses a lot of arrows and I don't understand what the arrows at each stage mean
const isType = <T>(type: string) => (obj: unknown): obj is T
The first part indicates that the function accepts a parameter and returns a boolean value of type judgment
=> toString.call(obj) === `[object ${type}]`
what the latter part means