Skip to content

Commit

Permalink
Update types for data fetch client in public/data
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Dec 11, 2019
1 parent 0b8765d commit cc07d6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x-pack/legacy/plugins/epm/public/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { HttpHandler } from 'src/core/public';
import { HttpFetchOptions, HttpHandler } from 'src/core/public';
import {
getCategoriesPath,
getFilePath,
Expand All @@ -23,7 +23,8 @@ import {
PackagesGroupedByStatus,
} from '../common/types';

const defaultClient: HttpHandler = (path, options?) => fetch(path, options).then(res => res.json());
const defaultClient: HttpHandler = (path: string, options?: HttpFetchOptions) =>
fetch(path, options).then(res => res.json());

let _fetch: HttpHandler = defaultClient;

Expand Down

0 comments on commit cc07d6b

Please sign in to comment.