UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

16 lines (15 loc) 480 B
import { Block } from './Block'; import type { Path } from '@jsonjoy.com/json-pointer'; import type { PeritextMlElement } from './types'; export interface IBlock<Attr = unknown> { readonly path: Path; readonly attr?: Attr; readonly parent: IBlock | null; } export declare class LeafBlock<Attr = unknown> extends Block<Attr> { text(): string; isLeaf(): boolean; toJson(): PeritextMlElement; toStringName(): string; toString(tab?: string): string; }