File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -515,38 +515,30 @@ type GenkitAction<
515
515
stream (
516
516
input : I [ "__output" ] ,
517
517
options : GenkitRunOptions
518
- ) : { stream : AsyncIterable < S [ "__output" ] > ; output : O [ "__output" ] } ;
518
+ ) : { stream : AsyncIterable < S [ "__output" ] > ; output : Promise < O [ "__output" ] > } ;
519
519
520
520
__action : {
521
521
name : string ;
522
522
} ;
523
523
} ;
524
524
525
- // Note: A double infer is required to extract the ZodType's native type from the GenkitAction, but triggers an
526
- // unused variable linter error for the ZodType wrapper.
527
- /* eslint-disable @typescript-eslint/no-unused-vars */
528
- type ActionInput < F extends GenkitAction > = F extends GenkitAction <
529
- infer I extends ZodType < infer T > ,
530
- any ,
531
- any
532
- >
533
- ? T
525
+ type ActionInput < F extends GenkitAction > = F extends GenkitAction < infer I extends ZodType , any , any >
526
+ ? I [ "__output" ]
534
527
: never ;
535
528
type ActionOutput < F extends GenkitAction > = F extends GenkitAction <
536
529
any ,
537
- infer O extends ZodType < infer T > ,
530
+ infer O extends ZodType ,
538
531
any
539
532
>
540
- ? T
533
+ ? O [ "__output" ]
541
534
: never ;
542
535
type ActionStream < F extends GenkitAction > = F extends GenkitAction <
543
536
any ,
544
537
any ,
545
- infer S extends ZodType < infer T >
538
+ infer S extends ZodType
546
539
>
547
- ? T
540
+ ? S [ "__output" ]
548
541
: never ;
549
- /* eslint-enable @typescript-eslint/no-unused-vars */
550
542
551
543
export function onCallGenkit < A extends GenkitAction > (
552
544
action : A
You can’t perform that action at this time.
0 commit comments