From d9735bcb68f6ee20478027038990164d61b5e081 Mon Sep 17 00:00:00 2001 From: Kerry Gallagher Date: Thu, 7 Feb 2019 13:18:22 +0000 Subject: [PATCH] Add explicit type for err parameter --- x-pack/plugins/infra/public/pages/metrics/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/infra/public/pages/metrics/index.tsx b/x-pack/plugins/infra/public/pages/metrics/index.tsx index 61fb8113b261..f5be6a68cb87 100644 --- a/x-pack/plugins/infra/public/pages/metrics/index.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/index.tsx @@ -14,6 +14,7 @@ import { EuiTitle, } from '@elastic/eui'; import { InjectedIntl, injectI18n } from '@kbn/i18n/react'; +import { GraphQLFormattedError } from 'graphql'; import React from 'react'; import styled, { withTheme } from 'styled-components'; @@ -130,7 +131,8 @@ export const MetricDetail = withTheme( if (error) { if (error.graphQLErrors) { const invalidNodeError = error.graphQLErrors.find( - (err: any) => err.code === InfraMetricsErrorCodes.invalid_node + (err: GraphQLFormattedError) => + err.code === InfraMetricsErrorCodes.invalid_node ); if (invalidNodeError) {