Type Alias Promisive<Instance, UseParametric>

Promisive<Instance, UseParametric>: RemoveNever<OmitEdgeUnderscored<{
    [P in keyof Instance]: Instance[P] extends Function
        ? Functional<Instance[P], UseParametric>
        : ValueOf<Instance[P]> extends object
            ? Instance[P] extends object
                ? Promisive<Instance[P], UseParametric>
                : never
            : never
} & IRemoteObject>>

Promisify an object type.

It promisifies all member types. When a member type is:

  • function: returns Promise (R -> Promise<R>).
  • object: promisifies recursively (O -> Promisify<O>).
  • atomic value: be ignored (be never type).

Type Parameters

  • Instance extends object

    An object type to be promised.

  • UseParametric extends boolean = false

    Whether to convert type of function parameters to be compatible with their pritimive.