mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
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 <yashar.moradi@scoperty.de>
This commit is contained in:
co-authored by
Yashar Moradi
parent
f49c947989
commit
29901d8879
+2
-1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/TryGhost/Ghost-SDK/tree/master/packages/content-api
|
||||
// Definitions by: Kevin Nguyen <https://github.com/knguyen0125>
|
||||
// Anton Van Eechaute <https://github.com/antonve>
|
||||
// Yashar Moradi <https://github.com/maveric1977>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export type ArrayOrValue<T> = T | T[];
|
||||
@@ -166,7 +167,7 @@ export interface BrowseFunction<T> {
|
||||
}
|
||||
|
||||
export interface ReadFunction<T> {
|
||||
(data: GhostData, options?: Params, memberToken?: Nullable<string>): Promise<T>;
|
||||
(data: { id: Nullable<string> } | { slug: Nullable<string> }, options?: Params, memberToken?: Nullable<string>): Promise<T>;
|
||||
}
|
||||
|
||||
export interface PostObject {
|
||||
|
||||
Reference in New Issue
Block a user