Skip to content

Commit 85cc607

Browse files
authored
fix(rivetkit): infer T from step/tryStep config object in workflow context wrapper (#5124)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes
1 parent aab1183 commit 85cc607

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • rivetkit-typescript/packages/rivetkit/src/workflow

rivetkit-typescript/packages/rivetkit/src/workflow/context.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class ActorWorkflowContext<
239239
}
240240

241241
async step<T>(
242-
nameOrConfig: string | Parameters<WorkflowContextInterface["step"]>[0],
242+
nameOrConfig: string | StepConfig<T>,
243243
run?: () => Promise<T>,
244244
): Promise<T> {
245245
if (typeof nameOrConfig === "string") {
@@ -261,9 +261,7 @@ export class ActorWorkflowContext<
261261
}
262262

263263
async tryStep<T>(
264-
nameOrConfig:
265-
| string
266-
| Parameters<WorkflowContextInterface["tryStep"]>[0],
264+
nameOrConfig: string | TryStepConfig<T>,
267265
run?: () => Promise<T>,
268266
): Promise<TryStepResult<T>> {
269267
if (typeof nameOrConfig === "string") {

0 commit comments

Comments
 (0)