Files
grafana/public/app/features/variables/shared/testing/datasourceVariableBuilder.ts
kay delaney cadc551a3c Chore: Remove deprecated re-exported template variable types (#87459)
Chore: Remove deprecated re-exported template varible types
2024-05-10 12:00:41 +01:00

18 lines
479 B
TypeScript

import { DataSourceVariableModel, QueryVariableModel, VariableRefresh } from '@grafana/data';
import { MultiVariableBuilder } from './multiVariableBuilder';
export class DatasourceVariableBuilder<
T extends DataSourceVariableModel | QueryVariableModel,
> extends MultiVariableBuilder<T> {
withRefresh(refresh: VariableRefresh) {
this.variable.refresh = refresh;
return this;
}
withRegEx(regex: string) {
this.variable.regex = regex;
return this;
}
}