From 7703b26deb2d904ccb9236834251b3a209de8911 Mon Sep 17 00:00:00 2001 From: vellengs Date: Fri, 15 Feb 2019 11:14:09 +0800 Subject: [PATCH] Fix missing export default (#3525) * fix types missing export default * Update package.json * Update index.d.ts * Update index.d.ts * Update index.d.ts --- .../Authorized/AuthorizedRoute.d.ts | 2 +- src/components/Charts/index.d.ts | 57 ++++++++++++++----- src/components/HeaderDropdown/index.d.ts | 2 + src/components/Login/LoginItem.d.ts | 2 +- 4 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 src/components/HeaderDropdown/index.d.ts diff --git a/src/components/Authorized/AuthorizedRoute.d.ts b/src/components/Authorized/AuthorizedRoute.d.ts index 912b283a..fc780004 100644 --- a/src/components/Authorized/AuthorizedRoute.d.ts +++ b/src/components/Authorized/AuthorizedRoute.d.ts @@ -10,4 +10,4 @@ export interface IAuthorizedRouteProps extends RouteProps { } export { authority }; -export class AuthorizedRoute extends React.Component {} +export default class AuthorizedRoute extends React.Component {} diff --git a/src/components/Charts/index.d.ts b/src/components/Charts/index.d.ts index 1ff27af2..57f1d527 100644 --- a/src/components/Charts/index.d.ts +++ b/src/components/Charts/index.d.ts @@ -1,17 +1,48 @@ import * as numeral from 'numeral'; -export { default as ChartCard } from './ChartCard'; -export { default as Bar } from './Bar'; -export { default as Pie } from './Pie'; -export { default as Radar } from './Radar'; -export { default as Gauge } from './Gauge'; -export { default as MiniArea } from './MiniArea'; -export { default as MiniBar } from './MiniBar'; -export { default as MiniProgress } from './MiniProgress'; -export { default as Field } from './Field'; -export { default as WaterWave } from './WaterWave'; -export { default as TagCloud } from './TagCloud'; -export { default as TimelineChart } from './TimelineChart'; +import { default as Bar } from './Bar'; +import { default as ChartCard } from './ChartCard'; +import { default as Field } from './Field'; +import { default as Gauge } from './Gauge'; +import { default as MiniArea } from './MiniArea'; +import { default as MiniBar } from './MiniBar'; +import { default as MiniProgress } from './MiniProgress'; +import { default as Pie } from './Pie'; +import { default as Radar } from './Radar'; +import { default as TagCloud } from './TagCloud'; +import { default as TimelineChart } from './TimelineChart'; +import { default as WaterWave } from './WaterWave'; declare const yuan: (value: number | string) => string; -export { yuan }; +declare const Charts: { + yuan: (value: number | string) => string; + Bar: Bar; + Pie: Pie; + Gauge: Gauge; + Radar: Radar; + MiniBar: MiniBar; + MiniArea: MiniArea; + MiniProgress: MiniProgress; + ChartCard: ChartCard; + Field: Field; + WaterWave: WaterWave; + TagCloud: TagCloud; + TimelineChart: TimelineChart; +}; + +export { + Charts as default, + yuan, + Bar, + Pie, + Gauge, + Radar, + MiniBar, + MiniArea, + MiniProgress, + ChartCard, + Field, + WaterWave, + TagCloud, + TimelineChart, +}; diff --git a/src/components/HeaderDropdown/index.d.ts b/src/components/HeaderDropdown/index.d.ts new file mode 100644 index 00000000..e9dac7e5 --- /dev/null +++ b/src/components/HeaderDropdown/index.d.ts @@ -0,0 +1,2 @@ +import * as React from 'react'; +export default class HeaderDropdown extends React.Component {} diff --git a/src/components/Login/LoginItem.d.ts b/src/components/Login/LoginItem.d.ts index 30a7a2d6..bcfb73b8 100644 --- a/src/components/Login/LoginItem.d.ts +++ b/src/components/Login/LoginItem.d.ts @@ -8,4 +8,4 @@ export interface ILoginItemProps { buttonText?: React.ReactNode; } -export class LoginItem extends React.Component {} +export default class LoginItem extends React.Component {} -- GitLab