@launchmenu/applet-dictionary
Version:
An applet to find dictionary definitions
61 lines • 1.87 kB
TypeScript
import { DataCacher, DataLoader, IDataHook } from "model-react";
import { Wiki } from "./Wiki";
import { WikiSection } from "./WikiSection";
import { IWikiSection } from "./_types/IWikiHierarchicalStructure";
import { IWikiSectionInfo } from "./_types/IWikiSectionInfo";
export declare class WikiPage<S extends WikiSection = WikiSection> {
protected wiki: Wiki;
protected title: string;
/**
* Creates a new local model of a wikipage
* @param wiki The wiki that this page is for
* @param title The name of the page
*/
constructor(wiki: Wiki, title: string);
/**
* Retrieves the wiki that this page is on
* @returns The wiki that this page is on
*/
getWiki(): Wiki;
/**
* Retrieves the word that this page is for
* @returns The term
*/
getTitle(): string;
protected rawSections: DataLoader<{
sections: {
[key: string]: IWikiSection<{
[key: string]: IWikiSectionInfo;
}>;
};
sectionList: IWikiSection[];
}, {
sections: {
[key: string]: IWikiSection<{
[key: string]: IWikiSectionInfo;
}>;
};
sectionList: IWikiSection<{
[key: string]: IWikiSectionInfo;
}>[];
}>;
/**
* Creates a section of this page
* @param data The section data
* @returns The wiki section
*/
protected createSection(data: IWikiSection): S;
/**
* The sections model
*/
protected sections: DataCacher<{
sectionList: S[];
}>;
/**
* Retrieves the sections of this page
* @param hook The hook to subscribe to changes
* @returns The sections
*/
getSectionList(hook?: IDataHook): S[];
}
//# sourceMappingURL=WikiPage.d.ts.map