Typescript distributive over mapped generics?
I know Typescript distributes generic types in conditionals, but why does it distribute when there is no condition?
Can I simplify AofO with Type Mapping?
I have a type of AccountQuery with specified options {SubAccount: boolean; Classification: "Asset" | "Liability";etc...
.
A relevant function can accept either an object (AccountQuery) or (|) array (AccountArrayOptions[]) as a parameter;
How an I use a conditional type with a generic in a generic function?
I have the following type system for a generic ApiResponse<DataT = void, ExtraT = void>
where you can either give it generics or not to produce different results: