I was trying to write a TypeScript type that turns [A, B, C, ...] (an array of objects) into (A & B & C & ...). It seemed inexpressible, then I realized it's what Object.assign does! But then I looked at the type for that and... whoops. https://github.com/Microsoft/TypeScript/blob/2f73986b44a4ec10c7ebe7188e23863c3879d54e/lib/lib.es2015.core.d.ts#L286 …
-
-
If you're curious, multiple attempts have been made at allowing variadic generics, but the problem with making that work for tuples is that you naturally want to treat them as an hlist and write impls recursively, but you can't take a pointer to the tail of a tuple
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
what the
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.