From cc07d6bf47f18862427b97ffa747a71c2934d5f5 Mon Sep 17 00:00:00 2001 From: John Schulz Date: Wed, 11 Dec 2019 13:38:34 -0500 Subject: [PATCH] Update types for data fetch client in public/data --- x-pack/legacy/plugins/epm/public/data.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/legacy/plugins/epm/public/data.ts b/x-pack/legacy/plugins/epm/public/data.ts index 88141d15f4afb..15b7105643a9c 100644 --- a/x-pack/legacy/plugins/epm/public/data.ts +++ b/x-pack/legacy/plugins/epm/public/data.ts @@ -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, @@ -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;