Skip to content

GramIO API Reference / @gramio/composer/dist / WithCtx

Type Alias: WithCtx<T, TCtx>

WithCtx<T, TCtx> = T extends ContextCallback ? (ctx) => unknown : T extends (...args) => any ? T : T extends object ? { [K in keyof T]: WithCtx<T[K], TCtx> } : T

Defined in: composer/index.d.ts:45

Recursively replaces all ContextCallback occurrences in T with (ctx: TCtx) => unknown.

Type Parameters

Type Parameter
T
TCtx