UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

18 lines (17 loc) 628 B
import type { ArrApi } from '../../../json-crdt/model'; import { NestedTag } from './NestedTag'; import type { Slice } from './Slice'; export declare class NestedType<T = string> { protected slice: Slice<T>; constructor(slice: Slice<T>); /** Enforces slice type to be an "arr" of tags. */ asArr(): ArrApi; /** * Nested tag API for nested block types. * * @param index The position of the tag in the type array. If not specified, * returns the last tag (255). Maximum index is 255. * @returns Slice tag API for the given position. */ tag(index?: number): NestedTag<T>; }