From cbf5e25ce13ecb4bb04493628f56dfd6cca8763a Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Wed, 12 Apr 2023 02:52:59 -0700 Subject: [PATCH 1/2] Annotate optional model fields correctly --- index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 5447694..af9138e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -19,13 +19,13 @@ declare module 'replicate' { url: string; owner: string; name: string; - description: string; + description?: string; visibility: 'public' | 'private'; - github_url: string; - paper_url: string; - license_url: string; + github_url?: string; + paper_url?: string; + license_url?: string; run_count: number; - cover_image_url: string; + cover_image_url?: string; default_example?: Prediction; latest_version?: ModelVersion; } From daa67135f52d22cd69708b8d49979d77fc30fbc7 Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Wed, 12 Apr 2023 02:53:29 -0700 Subject: [PATCH 2/2] Annotate optional prediction fields correctly --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index af9138e..924104a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -42,7 +42,7 @@ declare module 'replicate' { status: Status; version: string; input: object; - output: any; + output?: any; source: 'api' | 'web'; error?: any; logs?: string;