Trilium Frontend API
    Preparing search index...

    Interface BufferCursor

    This is used by Tree.build as an abstraction for iterating over a tree buffer. A cursor initially points at the very last element in the buffer. Every time next() is called it moves on to the previous one.

    interface BufferCursor {
        end: number;
        id: number;
        pos: number;
        size: number;
        start: number;
        fork(): BufferCursor;
        next(): void;
    }
    Index

    Properties

    Methods

    Properties

    end: number

    The end position of the next node.

    id: number

    The node ID of the next node in the buffer.

    pos: number

    The current buffer position (four times the number of nodes remaining).

    size: number

    The size of the next node (the number of nodes inside, counting the node itself, times 4).

    start: number

    The start position of the next node in the buffer.

    Methods

    • Create a copy of this cursor.

      Returns BufferCursor

    • Moves this.pos down by 4.

      Returns void