From 29901d887952aa660df4a5bc527b4899b402a89e Mon Sep 17 00:00:00 2001 From: Yashar Moradi Date: Thu, 2 Apr 2020 20:08:34 +0200 Subject: [PATCH] Ghost content api ghostdata fix (#43417) * ReadFunction requres either id or slug in data. * Added name to the authors * Changed data arg to an either or id/slug option Co-authored-by: Yashar Moradi --- types/tryghost__content-api/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/tryghost__content-api/index.d.ts b/types/tryghost__content-api/index.d.ts index 39ea2bf087..6903802fc0 100644 --- a/types/tryghost__content-api/index.d.ts +++ b/types/tryghost__content-api/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/TryGhost/Ghost-SDK/tree/master/packages/content-api // Definitions by: Kevin Nguyen // Anton Van Eechaute +// Yashar Moradi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export type ArrayOrValue = T | T[]; @@ -166,7 +167,7 @@ export interface BrowseFunction { } export interface ReadFunction { - (data: GhostData, options?: Params, memberToken?: Nullable): Promise; + (data: { id: Nullable } | { slug: Nullable }, options?: Params, memberToken?: Nullable): Promise; } export interface PostObject {