Skip to content

Commit

Permalink
remove core from query suggestion function
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sebastian <[email protected]>
  • Loading branch information
paulstn committed Jul 31, 2024
1 parent 3e4e40a commit 593146f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions src/plugins/data/public/autocomplete/autocomplete_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ export class AutocompleteService {
this.autocompleteConfig = autocomplete;
}

private core: CoreSetup | undefined;

private readonly querySuggestionProviders: Map<string, QuerySuggestionGetFn> = new Map();
private getValueSuggestions?: ValueSuggestionsGetFn;

Expand All @@ -63,7 +61,7 @@ export class AutocompleteService {
const provider = this.querySuggestionProviders.get(language);

if (provider) {
return provider({ core: this.core, ...args });
return provider(args);

Check warning on line 64 in src/plugins/data/public/autocomplete/autocomplete_service.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/data/public/autocomplete/autocomplete_service.ts#L64

Added line #L64 was not covered by tests
}
};

Expand All @@ -75,8 +73,6 @@ export class AutocompleteService {
? setupValueSuggestionProvider(core)
: getEmptyValueSuggestions;

this.core = core;

return {
addQuerySuggestionProvider: this.addQuerySuggestionProvider,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*/

import { monaco } from '@osd/monaco';
import { CoreSetup } from 'opensearch-dashboards/public';
import { IFieldType, IndexPattern } from '../../../common/index_patterns';
import { IDataPluginServices } from '../../types';

Expand All @@ -56,7 +55,6 @@ export interface QuerySuggestionGetFnArgs {
boolFilter?: any;
position?: monaco.Position;
services?: IDataPluginServices;
core?: CoreSetup;
}

/** @public **/
Expand Down

0 comments on commit 593146f

Please sign in to comment.