Table of content model factory interface

interface IFactory<W, H> {
    createNew: ((widget, configuration?) => TableOfContents.IModel<H>);
    isApplicable: ((widget) => boolean);
}

Type Parameters

Implemented by

Properties

createNew: ((widget, configuration?) => TableOfContents.IModel<H>)

Create a new table of contents model for the widget

Type declaration

Returns

The table of contents model

isApplicable: ((widget) => boolean)

Whether the factory can handle the widget or not.

Type declaration

    • (widget): boolean
    • Parameters

      • widget: W

        widget

      Returns boolean

Returns

boolean indicating a ToC can be generated