Skip to content

Commit

Permalink
Fix Page content return type
Browse files Browse the repository at this point in the history
Resolves dijs#164
  • Loading branch information
mattvick committed Dec 13, 2023
1 parent 79f22ec commit 22b474a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -116,12 +127,12 @@ declare module 'wikijs' {
categories(aggregated?: boolean, limit?: number): Promise<string[]>;

/**
* Text content from page
* Array of page sections
*
* @returns {Promise<string>}
* @returns {Promise<PageSection[]>}
* @memberof Page
*/
content(): Promise<string>;
content(): Promise<PageSection[]>;

/**
* Geographical coordinates from page
Expand Down

0 comments on commit 22b474a

Please sign in to comment.