I have this type:
type Bar = number; type Foo = { doIt: ((value: string) => Bar) | ((value: string, provideBar: (bar: Bar) => void) => void); }