Closed samhh closed 3 years ago
Unsure if this is preferable but chucking it here just in case:
function mkConstructor<A extends AnyMember>(k: Tags<A>): (x: Values<A>) => A; function mkConstructor<A extends AnyMember>(k: Tags<A>): () => A; function mkConstructor(k: string) { return (x: unknown) => ({ [tagKey]: k, [valueKey]: x }); }
Unsure if this is preferable but chucking it here just in case: