2025-05-12 05:38:44 +09:00

83 lines
2.0 KiB
TypeScript

import Immutable from "immutable";
import File from "./file";
import SummaryArticle from "./summaryArticle";
type Parts = Immutable.List<any>;
declare const Summary_base: Immutable.Record.Class;
declare class Summary extends Summary_base {
getFile(): File;
getParts(): Parts;
/**
Return a part by its index
*/
getPart(i: number): any;
/**
Return an article using an iterator to find it.
if "partIter" is set, it can also return a Part.
@param {Function} iter
@param {Function} [partIter]
@return {Article|Part}
*/
getArticle(iter: any, partIter?: any): SummaryArticle | null;
/**
Return a part/article by its level
@param {string} level
@return {Article|Part}
*/
getByLevel(level: string): SummaryArticle;
/**
Return an article by its path
@param {string} filePath
@return {Article}
*/
getByPath(filePath: string): SummaryArticle;
/**
Return the first article
@return {Article}
*/
getFirstArticle(): SummaryArticle;
/**
Return next article of an article
*/
getNextArticle(current: SummaryArticle | string): SummaryArticle;
/**
Return previous article of an article
@param {Article} current
@return {Article}
*/
getPrevArticle(current: any): any;
/**
Return the parent article, or parent part of an article
@param {String|Article} current
@return {Article|Part|Null}
*/
getParent(level: any): SummaryArticle;
/**
Render summary as text
@param {string} parseExt Extension of the parser to use
@return {Promise<String>}
*/
toText(parseExt: any): any;
/**
Return all articles as a list
@return {List<Article>}
*/
getArticlesAsList(): Immutable.List<any>;
/**
Create a new summary for a list of parts
@param {Lust|Array} parts
@return {Summary}
*/
static createFromParts(file: any, parts: any): Summary;
}
export default Summary;
//# sourceMappingURL=summary.d.ts.map