Dan Vanderkam

Results 337 comments of Dan Vanderkam

So there _is_ a rationale behind this. Nice find @jfet97! It's news to me that "distributing over unions" is a concept that predates conditional types. This behavior was never mentioned...

_Comment by **Serhii** on **2021-07-07 09:13**:_ Here I have overloaded BuiltIn CallableFunction

Comment by **franzkissig** on **2020-11-23 03:37**: Thx for the nice article! The end is unconventional ;-)

Comment by **danvdk** on **2020-11-23 10:58**: Should be fixed now, thanks for the heads up. In case you're curious, this had to do with some annotations I added for literate-ts.

Comment by **ProGamingTvG** (**progamingtvg**) on **2021-06-12 10:58**: Thx man, super helpful! I had created extra types instead of using "keyof". How embarassing. Also, I was using type assertions inside the...

Comment by **Robert Konigsberg** (**robert_konigsberg**) on **2022-02-24 12:40**: es6 map is useful, but often feels clunky, particularly as I need to test for inclusion viz. `has` or `!== undefined`. So...

Testing [Utterances](https://utteranc.es/) for comments 💬

_Comment by **Ramiro** on **2021-01-19 11:55**:_ here more pulishedtype toJSON<t> = T extends { toJSON: (...args: any) => infer R } ? toJSON<r> : T extends Array<infer i=""> ? Array<tojson<i>>...

@louwers Adding a type annotation will test assignability, not type equality or the display of the type (which is also part of the usability of the library, see [The Display...

_Comment by **Serhii** on **2021-04-12 03:36**:_ From TypeScript perspective it is ok. But I strongly believe that it is not so good for V8 engine - https://v8.dev/blog/react-c... . Unfortunately, there...