Documentation

getSingleView()

Returns the view object that rendered the currently matched output element, if there’s only one.

getSingleView<TView extends View>(type: new (...args: any[]) => TView): TView;

Errors

This method throws an error if the current selection consists of more than one element, or none at all.

Related