grafana/public/test/helpers/getTemplateSrvDependencies.ts
Torkel Ödegaard 1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00

10 lines
527 B
TypeScript

import { getFilteredVariables, getVariables, getVariableWithName } from '../../app/features/variables/state/selectors';
import { StoreState } from '../../app/types';
import { TemplateSrvDependencies } from 'app/features/templating/template_srv';
export const getTemplateSrvDependencies = (state: StoreState): TemplateSrvDependencies => ({
getFilteredVariables: (filter) => getFilteredVariables(filter, state),
getVariableWithName: (name) => getVariableWithName(name, state),
getVariables: () => getVariables(state),
});