devtypes - v1.1.0
    Preparing search index...

    Type Alias MethodsObject<T>

    MethodsObject: Pick<T, MethodNames<T>>

    Extract method types from a class as an object.

    Type Parameters

    • T

      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 ) => ...; }