From 4a43c0992c1174faa80f9e265a08705e55e74c11 Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Tue, 7 Jun 2022 12:53:00 -0400 Subject: [PATCH] Re-introduce required id types for `FormatType`. --- .../public/components/shared/exploratory_view/types.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts index f0ae7a6dd2a0a..74d0578d459f9 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts @@ -123,6 +123,10 @@ export interface ConfigProps { series?: SeriesUrl; } +interface FormatType extends SerializedFieldFormat { + id: 'duration' | 'number' | 'bytes' | 'percent'; +} + export type AppDataType = 'synthetics' | 'ux' | 'infra_logs' | 'infra_metrics' | 'apm' | 'mobile'; type InputFormat = 'microseconds' | 'milliseconds' | 'seconds'; @@ -138,7 +142,7 @@ export interface FieldFormatParams extends BaseFieldFormatParams { export interface FieldFormat { field: string; - format: SerializedFieldFormat; + format: FormatType; } export interface BuilderItem {