Skip to content

Commit

Permalink
Merge pull request #1 from mattvick/bugfix/page-content-return-type
Browse files Browse the repository at this point in the history
Fix Page content return type
  • Loading branch information
mattvick authored Dec 13, 2023
2 parents 79f22ec + 22b474a commit ff15320
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 ff15320

Please sign in to comment.