Stevenaces

Results 6 comments of Stevenaces

If you have some question about `PromiseLike` type, you can see [PromiseLike](https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_typedoc_node_modules_typescript_lib_lib_es5_d_.promiselike.html) reference.

```ts type Pop = T extends [] ? [] : T extends [...infer R, infer L] ? R : never; ```

What a clever answer!

Now arrays not only include string, but also numeric types: ```typescript type TupleToObject = { [P in T[number]]: P } ```

> anybody can tell me why this doesn't work. > > ```ts > type LookUp = U['type'] extends T ? U : never > ``` May you need write as...

Now, the above solution can't pass the follow case: `Expect` My answer is as folllows, which hash a bit different from above: ```ts type RemoveUndefined = [T] extends [undefined] ?...