Interface ISharedPersister<J>

interface ISharedPersister<J> {
    endPersist(): void;
    fromJSON(json): void;
    fromResourceId(resourceId): IPersistableAble<J>;
    toJSON(): Promise<J[]>;
    toResourceId(sharedResource): number;
}

Type Parameters

  • J

Methods

  • Called when done persisting.

    Returns void

  • Loads the json into the shared styles.

    Parameters

    • json: J[]

    Returns void

  • This can be called multiple times.

    Returns Promise<J[]>

    Remarks

    Only shared styles that have had the toResourceId called will be shown in the persisted json.

  • For a sharedResource this will return a number that can be used to reference the resource in the persisted json.

    Parameters

    Returns number