Skip to content

Commit 9fb5213

Browse files
matttaron
authored andcommitted
Fix type definitions for predictions.create methods
1 parent be0f323 commit 9fb5213

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ declare module "replicate" {
162162
signal?: AbortSignal;
163163
},
164164
progress?: (prediction: Prediction) => void
165-
): Promise<object>;
165+
): Promise<Prediction | any>;
166166

167167
stream(
168168
identifier: `${string}/${string}` | `${string}/${string}:${string}`,
@@ -215,9 +215,9 @@ declare module "replicate" {
215215
stream?: boolean;
216216
webhook?: string;
217217
webhook_events_filter?: WebhookEventType[];
218-
block?: boolean;
218+
wait?: boolean | number | { mode?: "poll"; interval?: number };
219219
}
220-
): Promise<Prediction>;
220+
): Promise<Prediction | any>;
221221
};
222222
get(
223223
deployment_owner: string,
@@ -304,9 +304,9 @@ declare module "replicate" {
304304
stream?: boolean;
305305
webhook?: string;
306306
webhook_events_filter?: WebhookEventType[];
307-
block?: boolean;
307+
wait?: boolean | number | { mode?: "poll"; interval?: number };
308308
} & ({ version: string } | { model: string })
309-
): Promise<Prediction>;
309+
): Promise<Prediction | any>;
310310
get(prediction_id: string): Promise<Prediction>;
311311
cancel(prediction_id: string): Promise<Prediction>;
312312
list(): Promise<Page<Prediction>>;

0 commit comments

Comments
 (0)