UNPKG

wikiparser-node

Version:

A Node.js parser for MediaWiki markup with AST

18 lines (17 loc) 641 B
import type { Dimension } from '../lib/node'; import type { AstNodes } from '../internal'; declare type NodeConstructor = abstract new (...args: any[]) => { readonly childNodes: readonly AstNodes[]; getDimension(): Dimension; }; export interface NodeLike { /** first child node / 首位子节点 */ readonly firstChild: AstNodes | undefined; /** last child node / 末位子节点 */ readonly lastChild: AstNodes | undefined; /** number of lines / 行数 */ readonly offsetHeight: number; /** number of columns of the last line / 最后一行的列数 */ readonly offsetWidth: number; } /** @ignore */