From 22b474a4f4bc853a217591f9b7f157c979d9e93e Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 13 Dec 2023 19:37:28 +0900 Subject: [PATCH] Fix Page content return type Resolves #164 --- index.d.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 1b3ec76..c056e93 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