Interface IViewerPlugin<TViewer, IsSync>

Interface for Viewer Plugins

interface IViewerPlugin<TViewer, IsSync> {
    constructor: {
        OldPluginType?: string;
        PluginType: string;
    };
    dependencies?: Class<IViewerPlugin<TViewer, IsSync>>[];
    dirty?: boolean;
    loadState?: ((prefix?, storage?) => Promise<void>);
    serializeWithViewer?: boolean;
    storeState?: ((prefix?, storage?, data?) => void);
    onAdded(viewer): IsSync extends false
        ? Promise<void>
        : void;
    onRemove(viewer): IsSync extends false
        ? Promise<void>
        : void;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

constructor: {
    OldPluginType?: string;
    PluginType: string;
}

Type declaration

  • Optional OldPluginType?: string
  • PluginType: string
dependencies?: Class<IViewerPlugin<TViewer, IsSync>>[]
dirty?: boolean
loadState?: ((prefix?, storage?) => Promise<void>)

Type declaration

    • (prefix?, storage?): Promise<void>
    • Parameters

      • Optional prefix: string
      • Optional storage: Storage

      Returns Promise<void>

serializeWithViewer?: boolean
storeState?: ((prefix?, storage?, data?) => void)

Type declaration

    • (prefix?, storage?, data?): void
    • Parameters

      • Optional prefix: string
      • Optional storage: Storage
      • Optional data: any

      Returns void

Methods

Generated using TypeDoc