SheetXL - v0.3.20
    Preparing search index...

    Interface IResource

    A resource is an item referenced elsewhere with the application. This will track when a resource is no longer being used and can be removed.

    interface IResource {
        isIResource: true;
        addReference(ref: any): void;
        addUnloadListener(listener: IUnloadListener): void;
        deleteReference(ref: any): void;
        getName(): string;
        getType(): Promise<string>;
        isClosed(): boolean;
        toBuffer(): Promise<ArrayBuffer>;
        toJSONAsync(): Promise<JSON>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    isIResource: true

    For runtime type checking.

    Methods

    • Add a reference to the resource.

      Parameters

      • ref: any

        The object to strongly hold the resource.

      Returns void

    • This does not follow the standard listener pattern and is only called once.

      Parameters

      • listener: IUnloadListener

      Returns void

    • Delete a reference to the resource.

      Parameters

      • ref: any

      Returns void

    • An optional name for the resource.

      Returns string

    • The mimetype of the resource.

      Returns Promise<string>

    • true if the resource if all references have been deleted.

      Returns boolean

    • Returns the resource as a Promise to array buffer.

      Returns Promise<ArrayBuffer>

    • For saving to json resources.

      Returns Promise<JSON>