Additional custom context that can be used for searching.
The ID of the search request. Can be used to tie related search requests together between providers.
The search query.
A list of search provider names to execute the search request against.
Registers a listener that is called when the search request is closed by the search requester.
Can be used to cleanup pending queries:
async function onUserInput(request) {
const myQuery = makeQuery(request.query);
request.onClose(() => {
myQuery.cancel();
});
const results = await myQuery.getResults();
return { results };
}
the listener to call when the request is closed.
Remove a registered listener.
function myListener(request, listener) {
// Do something
}
request.removeListener(myListener);
the listener to remove.
Generated using TypeDoc
Representation of a search request passed as a parameter to a SearchProvider's
onUserInput
listener function.