PromisifyInterface | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Type Alias PromisifyInterface<ServiceType, ExcludeKeys>

    PromisifyInterface: {
        [K in Exclude<keyof ServiceType, ExcludeKeys> as ServiceType[K] extends (
            ...a: any,
        ) => any
            ? K
            : never]: ServiceType[K] extends (...a: any[]) => void
            ? PromisifyFunctionReturnType<ServiceType[K]>
            : never
    }

    Promisify all functions in an interface

    Type Parameters

    • ServiceType

      The interface type whose functions will be promisified

    • ExcludeKeys extends string = never

      Keys to exclude from promisification