Skip to content

GramIO API Reference / gramio/dist / WithDecorate

Type Alias: WithDecorate<TThis, D, AsGlobal>

WithDecorate<TThis, D, AsGlobal> = TThis extends EventComposer<infer TBase, infer TEventMap, infer TIn, infer TOut, infer TExposed, infer TDerives, infer TMethods, infer TMacros> ? EventComposer<TBase, TEventMap, TIn, TOut & D, AsGlobal extends true ? TExposed & D : TExposed, TDerives, TMethods, TMacros> & TMethods : never

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

Re-type a composer-like that has just added a decorate of shape D. When called with { as: "global" | "scoped" } you can flip AsGlobal to true so TExposed widens too (the standard composer behavior).

Type Parameters

Type ParameterDefault type
TThis-
D extends object-
AsGlobal extends booleanfalse