Extract method types from a class as an object.
A class or object type
Produces an object mapping method names to their signatures. Represents the callable interface of the class, similar to its TypeScript interface.
class API { fetch( url: string ) {} post( url: string, data: any ) {} }type Methods = MethodsObject< API >;// { fetch: ( url: string ) => ...; post: ( url: string, data: any ) => ...; } Copy
class API { fetch( url: string ) {} post( url: string, data: any ) {} }type Methods = MethodsObject< API >;// { fetch: ( url: string ) => ...; post: ( url: string, data: any ) => ...; }
Extract method types from a class as an object.