Skip to main content
Module

x/enzastdlib/rpc-protocol/procedure.ts>PromisifyProcedure

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
type alias PromisifyProcedure
import { type PromisifyProcedure } from "https://deno.land/x/enzastdlib@v0.0.4/rpc-protocol/procedure.ts";

Represents a utility type that "promisifies" a procedures by converting its second argument as its only argument. And converts its return type into a Promise if not already.

Type Parameters

Procedure extends ProcedureCallback
optional
Options extends CallOptions = CallOptions
optional
_ParametersType = Parameters<Procedure>[1]
optional
_ReturnType = Promisify<ReturnType<Procedure>>
definition: _ParametersType extends undefined ? ((parameters?: undefined, options?: Options) => _ReturnType) : ((parameters: _ParametersType, options?: Options) => _ReturnType)