Typed variables pt1: Use discriminated union for variable model (#52981)
* wip * make diff easier to read * Update template_srv getVariables to return new TypedVariableModel * update VariableType to use the type from TypedVariableModel * tidy things up
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { VariableModel, ScopedVars, TimeRange } from '@grafana/data';
|
||||
import { ScopedVars, TimeRange, TypedVariableModel } from '@grafana/data';
|
||||
|
||||
/**
|
||||
* Via the TemplateSrv consumers get access to all the available template variables
|
||||
@@ -11,7 +11,7 @@ export interface TemplateSrv {
|
||||
/**
|
||||
* List the dashboard variables
|
||||
*/
|
||||
getVariables(): VariableModel[];
|
||||
getVariables(): TypedVariableModel[];
|
||||
|
||||
/**
|
||||
* Replace the values within the target string. See also {@link InterpolateFunction}
|
||||
|
||||
Reference in New Issue
Block a user