TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Evaluate inference changes in reselect due to tuple type mapping changes

Open DanielRosenwasser opened this issue 3 years ago • 2 comments

In #50831, we fixed a bug around ensuring that optional tuple elements always contain a missing/undefined type, even when a mapped type tries to remove them.

However, this had some impact on 2 calls to reduxjs/reselect. Occasionally undefined can spoil inference results, but it's not clear where that might be taking place in the library.

DanielRosenwasser avatar Sep 21 '22 01:09 DanielRosenwasser

See here for a simplified version of the MergeParameters type that works with TS 4.7 and later.

ahejlsberg avatar Sep 21 '22 15:09 ahejlsberg

FYI I was able to successfully use the MergeParameters type from Anders, although the publishing step to make the package work from 4.2...4.9 was awkward:

https://github.com/reduxjs/reselect/pull/587

markerikson avatar Nov 04 '22 01:11 markerikson

This investigation was resolved. reselect shipped the type provided by Anders. I think that this issue could be closed now :) cc @jakebailey

Andarist avatar Aug 26 '23 22:08 Andarist