Type Alias: GroupConfigurator()<TContext, TCommon>
ts
type GroupConfigurator<TContext, TCommon> = (group) => void;Defined in: packages/core/src/core/builder/ActionGroupBuilder.ts:55
Callback for configuring actions within a group.
Receives an ActionGroupBuilder to register actions and middleware.
Type Parameters
| Type Parameter | Description |
|---|---|
TContext | Application context type |
TCommon extends Record<string, unknown> | Common schema shape |
Parameters
| Parameter | Type |
|---|---|
group | ActionGroupBuilder<TContext, TCommon> |
Returns
void
Example
typescript
const configure: GroupConfigurator<AppContext, { workspace_id: string }> = (g) => g
.query('list', listHandler)
.mutation('delete', deleteHandler);
builder.group('users', 'User management', configure);