@squareys/webdecks-sdk - v0.0.0
    Preparing search index...

    Class Handle<H>Abstract

    The base for every wrapper the SDK hands out (a paragraph, run, table, comment, …). A wrapper stores nothing but a numeric handle into the wasm heap and a back-pointer to its host engine; every getter round-trips through the handle, so a read always reflects the current engine state and no document data is duplicated in JavaScript.

    Wrappers are created once per handle and reused forever (see HandleCache), so reference equality is identity: document.paragraph(3) === document.paragraph(3).

    A wrapper that outlives the thing it points at is poisoned, not silently wrong: reading the live Handle._index after invalidation throws StaleHandleError, and Handle.isValid reports the state cheaply so callers can check before use.

    Type Parameters

    Hierarchy (View Summary)

    Index
    • get isValid(): boolean

      Whether this wrapper still refers to a live engine object.

      Returns boolean

    • set _index(value: number): void

      Parameters

      • value: number

      Returns void

    • Reference equality is the identity test — prefer a === b. This is retained only for the rare cross-realm case where two wrappers describe the same handle by value. Reads the raw index so comparing a stale wrapper never throws.

      Parameters

      • other: Handle<unknown> | null

      Returns boolean

    • A readable identity for logs and diagnostics, never [object Object].

      Returns string