Skip to content

Commit b50f8a6

Browse files
committed
Add back run identifier type definition
1 parent 339746b commit b50f8a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ declare module 'replicate' {
5858

5959
export type Training = Prediction;
6060

61+
type RunIdentifier = `${string}/${string}:${string}`;
62+
6163
interface RunOptions {
6264
input: any;
6365
wait?: {
@@ -87,8 +89,8 @@ declare module 'replicate' {
8789
fetch: Function;
8890

8991

90-
run(identifier: string, options: RunOptions & { stream: true }): Promise<AsyncIterable<any>>;
91-
run(identifier: string, options: RunOptions): Promise<object>;
92+
run(identifier: RunIdentifier, options: RunOptions & { stream: true }): Promise<AsyncIterable<any>>;
93+
run(identifier: RunIdentifier, options: RunOptions): Promise<object>;
9294

9395
request(route: string, parameters: any): Promise<any>;
9496
paginate<T>(endpoint: () => Promise<Page<T>>): AsyncGenerator<[ T ]>;

0 commit comments

Comments
 (0)