Skip to content

Commit 0f38b4a

Browse files
samoussHaroenv
authored andcommitted
feat(types): DerivedHelper (#3887)
1 parent 3a41c1d commit 0f38b4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/types/instantsearch.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { EventEmitter } from 'events';
12
import { Client as AlgoliaSearchClient } from 'algoliasearch';
23
import { InsightsClient as AlgoliaInsightsClient } from './insights';
34
import {
@@ -112,6 +113,10 @@ export type StateMapping<TRouteState = UiState> = {
112113
export type Client = AlgoliaSearchClient;
113114

114115
export type Helper = AlgoliaSearchHelper;
116+
export type DerivedHelper = EventEmitter & {
117+
lastResults: SearchResults | null;
118+
detach(): void;
119+
};
115120

116121
export type InstantSearch = {
117122
templatesConfig: object;

0 commit comments

Comments
 (0)