Skip to content

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

Interface: ContextCallback()

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

Marker type for context-aware callbacks in macro options. The framework replaces this with the actual handler context type at the call site.

Example

ts
interface ThrottleOptions {
  limit: number;
  onLimit?: ContextCallback;  // ← framework substitutes the real ctx type
}

ContextCallback(ctx): unknown

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

Marker type for context-aware callbacks in macro options. The framework replaces this with the actual handler context type at the call site.

Parameters

ParameterType
ctxnever

Returns

unknown

Example

ts
interface ThrottleOptions {
  limit: number;
  onLimit?: ContextCallback;  // ← framework substitutes the real ctx type
}

Properties

PropertyModifierTypeDefined in
[ContextCallbackBrand]readonlytruecomposer/index.d.ts:38