Skip to content

Commit

Permalink
ISearchInterceptor interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Aug 12, 2020
1 parent 675a619 commit c743e25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/plugins/data/public/search/search_interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,5 @@ export class SearchInterceptor {
}
};
}

export type ISearchInterceptor = PublicMethodsOf<SearchInterceptor>;
4 changes: 2 additions & 2 deletions src/plugins/data/public/search/search_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { calculateBounds, TimeRange } from '../../common/query';

import { IndexPatternsContract } from '../index_patterns/index_patterns';
import { GetInternalStartServicesFn } from '../types';
import { SearchInterceptor } from './search_interceptor';
import { ISearchInterceptor, SearchInterceptor } from './search_interceptor';
import {
getAggTypes,
getAggTypesFunctions,
Expand All @@ -54,7 +54,7 @@ interface SearchServiceStartDependencies {
export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
private esClient?: LegacyApiCaller;
private readonly aggTypesRegistry = new AggTypesRegistry();
private searchInterceptor!: SearchInterceptor;
private searchInterceptor!: ISearchInterceptor;
private usageCollector?: SearchUsageCollector;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface ISearchStartLegacy {
}

export interface SearchEnhancements {
searchInterceptor: SearchInterceptor;
searchInterceptor: ISearchInterceptor;
}
/**
* The setup contract exposed by the Search plugin exposes the search strategy extension
Expand Down

0 comments on commit c743e25

Please sign in to comment.