We created a pipe that sorts an array and that have sort options.
The options are an array of SortOption ts interface SortOption<Type, Key extends keyof Type, Value> { property: Key; order?: 'asc' | 'desc'; transformFn?: (value: Type[Key]) => Value; }
What we expect:
The option transformFn must have its value argument well inferred corresponding of the option property (for each option in our options array)
What we currently have:
The option transformFn has its value argument type inferred with the union return type of all the keys of Type (you can see an example on the screenshots below)