1
0
Files
world/book/node_modules/honkit/lib/models/summaryArticle.d.ts
2025-05-12 05:38:44 +09:00

93 lines
2.2 KiB
TypeScript

import Immutable from "immutable";
import File from "./file";
import Book from "./book";
import Readme from "./readme";
type Articles = Immutable.List<SummaryArticle>;
declare const SummaryArticle_base: Immutable.Record.Class;
declare class SummaryArticle extends SummaryArticle_base {
getLevel(): string;
getTitle(): string;
getRef(): string;
getArticles(): Articles;
/**
* Return how deep the article is.
* The README has a depth of 1
*
* @return {number}
*/
getDepth(): number;
/**
* Get path (without anchor) to the pointing file.
* It also normalizes the file path.
*
* @return {string}
*/
getPath(): string;
/**
* Return url if article is external
*
* @return {string}
*/
getUrl(): string;
/**
* Get anchor for this article (or undefined)
*
* @return {string}
*/
getAnchor(): string;
/**
* Create a new level for a new child article
*
* @return {string}
*/
createChildLevel(): string;
/**
* Is article pointing to a page of an absolute url
*
* @return {boolean}
*/
isPage(): boolean;
/**
* Check if this article is a file (exatcly)
*
* @param {File} file
* @return {boolean}
*/
isFile(file: File): boolean;
/**
* Check if this article is the introduction of the book
*
* @param {Book|Readme} book
* @return {boolean}
*/
isReadme(book: Book | Readme): boolean;
/**
* Is article pointing to aan absolute url
*
* @return {boolean}
*/
isExternal(): boolean;
/**
* Create a SummaryArticle
*
* @param {Object} def
* @return {SummaryArticle}
*/
static create(def: any, level: any): SummaryArticle;
/**
* Has anchor for this article
*
* @return {boolean}
*/
hasAnchor(): boolean;
/**
* Find an article from a base one
*
* @param {Article|Part} base
* @param {Function(article)} iter
* @return {Article}
*/
static findArticle(base: any, iter: any): SummaryArticle | null;
}
export default SummaryArticle;
//# sourceMappingURL=summaryArticle.d.ts.map