SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IPersistScope<J>

    A transient scope for items to ids that can be used for references.

    interface IPersistScope<J = any> {
        add(item: J | JSONSerializableAsync<J>): number | null;
        at(id: number): J | JSONSerializableAsync<J> | null;
        endPersist(): void;
        fromJSON(json: J[]): void;
        toJSONAsync(): Promise<J[]>;
    }

    Type Parameters

    • J = any
    Index
    • For a shared string this will return a number that can be used to reference the item in the persisted json.

      Parameters

      • item: J | JSONSerializableAsync<J>

        The to return an identifier for.

      Returns number | null

    • For a given persist id this will return the item.

      Parameters

      • id: number

      Returns J | JSONSerializableAsync<J> | null

    • Called when done persisting.

      Returns void

    • Loads the json.

      Parameters

      • json: J[]

      Returns void

    • Return a array of resources that have been added via add.

      Returns Promise<J[]>

      This can be called multiple times..