Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't worry about empty tuple types in TupleToIntersection.
Although a zero-argument call to `mergeDeep` was always pretty pointless, it seemed worth handling that case for the sake of completeness. Well, apparently empty tuple types are forbidden by section 3.8.5 of the TypeScript spec, so (some versions of) the compiler complain about the `[]` in the `T extends []` case of `TupleToIntersection`: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#385-tuple-type-literals Since we never really needed this case in the first place, the easy solution is to remove it. Note that the final cases in `TupleToIntersection` continue to cover the zero-argument case, for whatever it may be worth: T extends (infer U)[] ? U : any Should fix #4501.
- Loading branch information