File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -740,20 +740,20 @@ export type EventBusConfig = z.infer<typeof EventBusConfigSchema>;
740740/**
741741 * Helper to create event bus configuration
742742 */
743- export const EventBusConfig = Object . assign ( EventBusConfigSchema , {
744- create : < T extends z . input < typeof EventBusConfigSchema > > ( config : T ) => config ,
745- } ) ;
743+ export function createEventBusConfig < T extends z . input < typeof EventBusConfigSchema > > ( config : T ) : T {
744+ return config ;
745+ }
746746
747747/**
748748 * Helper to create event type definition
749749 */
750- export const EventTypeDefinition = Object . assign ( EventTypeDefinitionSchema , {
751- create : < T extends z . input < typeof EventTypeDefinitionSchema > > ( definition : T ) => definition ,
752- } ) ;
750+ export function createEventTypeDefinition < T extends z . input < typeof EventTypeDefinitionSchema > > ( definition : T ) : T {
751+ return definition ;
752+ }
753753
754754/**
755755 * Helper to create event webhook configuration
756756 */
757- export const EventWebhookConfig = Object . assign ( EventWebhookConfigSchema , {
758- create : < T extends z . input < typeof EventWebhookConfigSchema > > ( config : T ) => config ,
759- } ) ;
757+ export function createEventWebhookConfig < T extends z . input < typeof EventWebhookConfigSchema > > ( config : T ) : T {
758+ return config ;
759+ }
Original file line number Diff line number Diff line change @@ -359,6 +359,12 @@ export const BatchTaskSchema = z.object({
359359
360360 /**
361361 * Progress callback
362+ *
363+ * Called after each batch completes to report progress.
364+ * Invoked asynchronously and should not throw errors.
365+ * If the callback throws, the error is logged but batch processing continues.
366+ *
367+ * @param progress - Object containing processed count, total count, and failed count
362368 */
363369 onProgress : z . function ( )
364370 . args ( z . object ( {
@@ -368,7 +374,7 @@ export const BatchTaskSchema = z.object({
368374 } ) )
369375 . returns ( z . void ( ) )
370376 . optional ( )
371- . describe ( 'Progress callback function' ) ,
377+ . describe ( 'Progress callback function (called after each batch) ' ) ,
372378} ) ;
373379
374380export type BatchTask = z . infer < typeof BatchTaskSchema > ;
You can’t perform that action at this time.
0 commit comments