Interface ISearchProviderFactory<T>

Interface for search provider factory

interface ISearchProviderFactory<T> {
    createNew: ((widget, translator?) => ISearchProvider);
    isApplicable: ((domain) => domain is T);
}

Type Parameters

Properties

createNew: ((widget, translator?) => ISearchProvider)

Instantiate a search provider for the widget.

Notes

The widget provided is always checked using isApplicable before calling this factory.

Type declaration

Returns

The search provider on the widget

isApplicable: ((domain) => domain is T)

Report whether or not this provider has the ability to search on the given widget. The function is a type guard, meaning that it returns a boolean, but has a type predicate (x is T) for its return signature.

Type declaration

    • (domain): domain is T
    • Parameters

      Returns domain is T