chore: adjusting the types of the checkpoint interface slightly

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-11-14 09:20:05 -07:00
parent f5a9a718ad
commit d674371495
3 changed files with 47 additions and 18 deletions
+4 -4
View File
@@ -38,10 +38,10 @@ export type ActionContext<
secrets?: TaskSecrets;
workspacePath: string;
input: TActionInput;
checkpoint<U extends JsonValue>(
key: string,
fn: () => Promise<U>,
): Promise<U>;
checkpoint<U extends JsonValue | void>(opts: {
key?: string;
fn: () => Promise<U> | U;
}): Promise<U>;
output(
name: keyof TActionOutput,
value: TActionOutput[keyof TActionOutput],