SheetXL - v0.3.20
    Preparing search index...

    Interface ISnapshot<D, S, C, J>

    Represents an immutable reference to an Record, capturing its content and metadata.

    interface ISnapshot<D = any, S = any, C = any, J = any> {
        isISnapshot: true;
        copyTo(destination: D, options?: CopyToOptions): C | Promise<C>;
        getCoords(): Readonly<C>;
        getMarkOptions(): ReferenceableClipboard.CopyOptions;
        getName(): string;
        getSource(): S;
        toHtml(): string | Promise<string>;
        toImage(): Blob | Promise<Blob>;
        toJSON(): J | Promise<J>;
        toText(): string | Promise<string>;
    }

    Type Parameters

    • D = any

      The type of the destination for copyTo.

    • S = any

      The type of the source for getSource``. @template C The type of the coordinates the snapshot is bound to. @template J The type of the JSON for toJSON`.

    • C = any
    • J = any
    Index

    Properties

    isISnapshot: true

    For runtime type checking.

    Methods

    • Copies the snapshot to the specified range.

      Parameters

      Returns C | Promise<C>

      A promise that resolves when the copy is complete, or void if no asynchronous operation is required.

    • Retrieves the coordinates that bound the current snapshot.

      Returns Readonly<C>

      Different types of snapshots may have different coordinate systems.

    • A user friendly name of a the snapshot item.

      Returns string

    • The source that created the snapshot. This is used to quickly do comparisons.

      Returns S

    • Converts the snapshot to an HTML representation.

      Returns string | Promise<string>

      A string or promise resolving to the HTML representation of the snapshot.

    • Converts the snapshot to an image blob.

      Returns Blob | Promise<Blob>

      A Blob or promise resolving to the image representation of the snapshot.

    • Converts the snapshot to a JSON object.

      Returns J | Promise<J>

      A JSON object or promise resolving to the JSON representation of the snapshot.

    • Converts the snapshot to a plain text representation.

      Returns string | Promise<string>

      A string or promise resolving to the text representation of the snapshot.