kentcdodds / old-kentcdodds.com

Kent's Homepage
http://kentcdodds.com
MIT License
735 stars 442 forks source link

Adding Operations Interface #671

Closed yairniz closed 3 years ago

yairniz commented 3 years ago

So we don't have to redefine each operation

yairniz commented 3 years ago

I didn't see the link mentioned in @Aprillion 's comment so this has become irrelevant. Not that I am very happy with the final result in https://kentcdodds.com/blog/how-to-write-a-constrained-identity-function-in-typescript as I consider functions done for the sake of Typescript a place where the language fails, but that's the author's way and he addressed it.

kentcdodds commented 3 years ago

I agree with you @yairniz. As I said in the blog post, this is a TypeScript failing that we have to workaround.