How can I easily modify a function's template parameter in TypeScript?
const selectFromObj = <T, S>(obj: T, selector: (obj: T) => S): S => selector(obj) // some function from external library
type SpecificType = {a: string, b: number}
const selectFromSpecificObj: <S>(obj: SpecificType, selector: (s: SpecificType) => S) => S = selectFromObj
// Is there a way to simplify the last two lines like this?
// Just to set T to {a: string, b: number}
// const selectFromSpecificObj: <S>(typeof selectFromObj<{a: string, b: number}, S>) = selectFromObj