Skip to content

GramIO API Reference / gramio/dist / WithExtend

Type Alias: WithExtend<TThis, UExposed, UDerives, UMacros>

WithExtend<TThis, UExposed, UDerives, UMacros> = TThis extends EventComposer<infer TBase, infer TEventMap, infer TIn, infer TOut, infer TExposed, infer TDerives, infer TMethods, infer TMacros> ? EventComposer<TBase, TEventMap, TIn, TOut & UExposed, TExposed, TDerives & UDerives, TMethods, TMacros & UMacros> & TMethods : never

Defined in: gramio/node_modules/composer/index.d.ts:457

Re-type a composer-like that has just .extend(other)-ed another composer (or composer-like, e.g. Plugin). Pulls other's exposed shape into TOut, intersects per-event derives, merges macros.

UMacros defaults to {} for the common case of extending something with no macros (e.g. a bare composer or a plugin).

Type Parameters

Type ParameterDefault type
TThis-
UExposed extends object-
UDerives extends Record<string, object>object
UMacros extends MacroDefinitionsobject