From 4406499e0a145cd8af4f377d4ab80111215b0242 Mon Sep 17 00:00:00 2001 From: Angoose <68403129+Angoooose@users.noreply.github.com> Date: Mon, 17 Jan 2022 21:09:03 -0600 Subject: [PATCH] Fixing Page.content() return type --- index.d.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 1b3ec76..ed7a8d5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -70,6 +70,17 @@ declare module 'wikijs' { imageinfo: object[]; } + /** + * Page section object + * + * @interface PageSection + */ + interface PageSection { + title: string, + content: string, + items?: PageSection[], + } + interface Result { results: string[]; query: string; @@ -116,12 +127,12 @@ declare module 'wikijs' { categories(aggregated?: boolean, limit?: number): Promise; /** - * Text content from page + * Array of page sections * - * @returns {Promise} + * @returns {Promise} * @memberof Page */ - content(): Promise; + content(): Promise; /** * Geographical coordinates from page