Get the this binding type from a function.
Function type
1.1.0
Extracts the this context type if present, or unknown if absent.
this
unknown
type Fn = ( this: { x: number }, y: string ) => void;type ThisType = ThisParameterType< Fn >; // { x: number } Copy
type Fn = ( this: { x: number }, y: string ) => void;type ThisType = ThisParameterType< Fn >; // { x: number }
Get the this binding type from a function.