createCommand
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
createCommand<
TSchema,TBase>(schema,Base?):ZodCommandClass<TSchema,TBase>
Defined in: packages/pipeline-zod/src/create-zod-request.ts:271
Generates a strongly-typed CQRS Command class from a Zod schema.
Automatically marks the class with requestKind = 'command',
attaches the Zod schema as static _zodSchema, forwards Standard Schema metadata (~standard),
lists the fields marked with updatable as static updatableFields,
and preserves any Base class inheritance.
Type Parameters
Section titled “Type Parameters”TSchema
Section titled “TSchema”TSchema extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>
TBase extends AbstractConstructor<object> = AbstractConstructor<object>
Parameters
Section titled “Parameters”schema
Section titled “schema”TSchema
TBase
Returns
Section titled “Returns”ZodCommandClass<TSchema, TBase>
Examples
Section titled “Examples”Defining a Command with a base class
Declaring the fields an update command changes