From 5d45796f5a9ed8c4e7c55e979a5681e2edc10948 Mon Sep 17 00:00:00 2001 From: Olivier Philippon Date: Mon, 7 Jan 2019 12:02:28 +0000 Subject: [PATCH] fix(typescript): Allow axis to be AxisProps or `null` Setting an axis to `null` is the only way to disable it, so we have to specify it as an authorised value in the TypeScript definitions. --- packages/line/index.d.ts | 8 ++++---- packages/scatterplot/index.d.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/line/index.d.ts b/packages/line/index.d.ts index e9ff189b3..78407c7e1 100644 --- a/packages/line/index.d.ts +++ b/packages/line/index.d.ts @@ -94,10 +94,10 @@ declare module '@nivo/line' { theme?: Theme - axisTop?: AxisProps - axisRight?: AxisProps - axisBottom?: AxisProps - axisLeft?: AxisProps + axisTop?: AxisProps | null + axisRight?: AxisProps | null + axisBottom?: AxisProps | null + axisLeft?: AxisProps | null enableGridX?: boolean enableGridY?: boolean diff --git a/packages/scatterplot/index.d.ts b/packages/scatterplot/index.d.ts index 269a4c95e..75a228e99 100644 --- a/packages/scatterplot/index.d.ts +++ b/packages/scatterplot/index.d.ts @@ -38,10 +38,10 @@ declare module '@nivo/scatterplot' { margin?: Box - axisTop?: AxisProps - axisRight?: AxisProps - axisBottom?: AxisProps - axisLeft?: AxisProps + axisTop?: AxisProps | null + axisRight?: AxisProps | null + axisBottom?: AxisProps | null + axisLeft?: AxisProps | null enableGridX?: boolean enableGridY?: boolean