]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
fix(types): exclude DeepPartial<unknown[]> from ChartOptions interface (#11867)
authorArtur Morys - Magiera <artus9033@gmail.com>
Fri, 16 Aug 2024 23:57:26 +0000 (01:57 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Aug 2024 23:57:26 +0000 (19:57 -0400)
* fix(types): exclude DeepPartial<unknown[]> from ChartOptions interface

* refactor: format index.d.ts to comply with ESLint rules

src/types/index.d.ts

index 65dd075e01463580e7c05671430ca0133682ca0b..fcdd44fe06be71e45ae9aa40da747ffd37c84884 100644 (file)
@@ -3742,13 +3742,16 @@ export type ScaleChartOptions<TType extends ChartType = ChartType> = {
   };
 };
 
-export type ChartOptions<TType extends ChartType = ChartType> = DeepPartial<
+export type ChartOptions<TType extends ChartType = ChartType> = Exclude<
+DeepPartial<
 CoreChartOptions<TType> &
 ElementChartOptions<TType> &
 PluginChartOptions<TType> &
 DatasetChartOptions<TType> &
 ScaleChartOptions<TType> &
 ChartTypeRegistry[TType]['chartOptions']
+>,
+DeepPartial<unknown[]>
 >;
 
 export type DefaultDataPoint<TType extends ChartType> = DistributiveArray<ChartTypeRegistry[TType]['defaultDataPoint']>;