Comment on A text adventure game on TypeScript's type systemComments−noduerme3yThis is neat. Can someone explain why the generic types extending string need to default to any in all these cases, like: `TDescription extends string = any` ?−cacozenOP3yIt’s just so I can later reuse that type without having to pass in the generic. Like I do on lines 41 and 42
Comments
This is neat. Can someone explain why the generic types extending string need to default to any in all these cases, like: `TDescription extends string = any` ?
It’s just so I can later reuse that type without having to pass in the generic. Like I do on lines 41 and 42