mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
b3cff22db3
* fixing some types * more type fixes * few more * last couple * tiny tweak
16 lines
376 B
TypeScript
16 lines
376 B
TypeScript
import { FetchResponse } from '@grafana/runtime';
|
|
|
|
export function createFetchResponse<T>(data: T): FetchResponse<T> {
|
|
return {
|
|
data,
|
|
status: 200,
|
|
url: 'http://localhost:3000/api/ds/query',
|
|
config: { url: 'http://localhost:3000/api/ds/query' },
|
|
type: 'basic',
|
|
statusText: 'Ok',
|
|
redirected: false,
|
|
headers: new Headers(),
|
|
ok: true,
|
|
};
|
|
}
|