Просмотр исходного кода

Clean up typescript definitions

Nikhil Bhargava 7 лет назад
Родитель
Сommit
df0ffd6d7a
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/components/Charts/ChartCard/index.d.ts
  2. 1 1
      src/components/Charts/Pie/index.d.ts

+ 1 - 1
src/components/Charts/ChartCard/index.d.ts

@@ -2,7 +2,7 @@ import * as React from 'react';
 export interface IChartCardProps {
 export interface IChartCardProps {
   title: React.ReactNode;
   title: React.ReactNode;
   action?: React.ReactNode;
   action?: React.ReactNode;
-  total?: React.ReactNode | function | number;
+  total?: React.ReactNode | number | (() => React.ReactNode | number);
   footer?: React.ReactNode;
   footer?: React.ReactNode;
   contentHeight?: number;
   contentHeight?: number;
   avatar?: React.ReactNode;
   avatar?: React.ReactNode;

+ 1 - 1
src/components/Charts/Pie/index.d.ts

@@ -10,7 +10,7 @@ export interface IPieProps {
     x: string | string;
     x: string | string;
     y: number;
     y: number;
   }>;
   }>;
-  total?: string | function;
+  total?: React.ReactNode | number | (() => React.ReactNode | number);
   title?: React.ReactNode;
   title?: React.ReactNode;
   tooltip?: boolean;
   tooltip?: boolean;
   valueFormat?: (value: string) => string | React.ReactNode;
   valueFormat?: (value: string) => string | React.ReactNode;