GramIO API Reference / gramio/dist / WithDecorate
Type Alias: WithDecorate<TThis, D, AsGlobal>
WithDecorate<
TThis,D,AsGlobal> =TThisextendsEventComposer<infer TBase, infer TEventMap, infer TIn, infer TOut, infer TExposed, infer TDerives, infer TMethods, infer TMacros> ?EventComposer<TBase,TEventMap,TIn,TOut&D,AsGlobalextendstrue?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 Parameter | Default type |
|---|---|
TThis | - |
D extends object | - |
AsGlobal extends boolean | false |