mirror of
https://github.com/grafana/grafana.git
synced 2025-01-06 22:23:19 -06:00
d87cd6f26c
* Update dependency prettier to v2.5.1 * prettier fixes * chore(toolkit): bump prettier to 2.5.1 * style(eslint): bump grafana config to 2.5.2 in core and toolkit * style(mssql-datasource): fix no-inferrable-types eslint errors Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com> Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
16 lines
391 B
TypeScript
16 lines
391 B
TypeScript
import { FetchResponse } from '@grafana/runtime';
|
|
|
|
export function createFetchResponse<T>(data: T): FetchResponse<T> {
|
|
return {
|
|
data,
|
|
status: 200,
|
|
url: 'http://localhost:3000/api/tsdb/query',
|
|
config: { url: 'http://localhost:3000/api/tsdb/query' },
|
|
type: 'basic',
|
|
statusText: 'Ok',
|
|
redirected: false,
|
|
headers: {} as unknown as Headers,
|
|
ok: true,
|
|
};
|
|
}
|