I always really enjoy his articles, I wish he had a newsletter so I could know when a new one is out.
Type Polymorphic Functions in TypeScript
11–15 of 15 posts
Re: Type Polymorphic Functions in TypeScript
#12given that amount of work(and maybe i'm just being lazy), wouldn't you prefer a unit test?
What amount of work?
Re: Type Polymorphic Functions in TypeScript
#13given that amount of work(and maybe i'm just being lazy), wouldn't you prefer a unit test?
If I can express something using the type system I'll always go with that first, so I don't even need the test to enforce the same contract.
Re: Type Polymorphic Functions in TypeScript
#14Can function overloads be marked private or deprecated independently? Does the implementation need to repeat the effective union type?
> Can function overloads be marked private or deprecated independently?
Private independently, no. Deprecated independently, yes.
> Does the implementation need to repeat the effective union type?
Yes, or use something even broader like `any`;
Re: Type Polymorphic Functions in TypeScript
#15Can function overloads be marked private or deprecated independently? Does the implementation need to repeat the effective union type?
I would recommend leveraging the RSS feed