TypeScript compiler can't decide which type to use: or I don't understand what I'm doing.Am i doing something wrong with the type inference
type Func = (() => void) | ((id: number) => void);interface A { [key: string]: (fn) => Func}interface B<G> { [Property in keyof G]: Func}/* Example */const AObjects = { addName: function addName(fn): Func { return () => fn(); } deletePerson: function deletePerson(fn): Func { return (id) => fn(id); }}function turnAtoB<A>(): B<A> { ...Implementation details}// The buttons are using interface B functions<Button onPress={addName} /> // gives TypeScript Error -> deduces the types as ((id) => void) instead of (() => void)<Button onPress={() => deletePerson(id)} /> // correctly deduces the type as ((id) => void)