chore: fix compile errors

This commit is contained in:
Benjy Cui 2016-09-13 15:31:29 +08:00
parent cda671fead
commit 8db2b79505
22 changed files with 32 additions and 32 deletions

View File

@ -4,7 +4,7 @@ import Animate from 'rc-animate';
import Icon from '../icon'; import Icon from '../icon';
import classNames from 'classnames'; import classNames from 'classnames';
interface AlertProps { export interface AlertProps {
/** /**
* Type of Alert styles, options:`success`, `info`, `warning`, `error` * Type of Alert styles, options:`success`, `info`, `warning`, `error`
*/ */

View File

@ -23,7 +23,7 @@ function getScroll(target, top) {
return ret; return ret;
} }
interface BackTopProps { export interface BackTopProps {
visibilityHeight?: number; visibilityHeight?: number;
onClick?: (event) => void; onClick?: (event) => void;
target?: () => HTMLElement | Window; target?: () => HTMLElement | Window;

View File

@ -3,7 +3,7 @@ import Animate from 'rc-animate';
import ScrollNumber from './ScrollNumber'; import ScrollNumber from './ScrollNumber';
import classNames from 'classnames'; import classNames from 'classnames';
interface BadgeProps { export interface BadgeProps {
/** Number to show in badge */ /** Number to show in badge */
count: number | string; count: number | string;
/** Max count to show */ /** Max count to show */

View File

@ -1,7 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import splitObject from '../_util/splitObject'; import splitObject from '../_util/splitObject';
interface BreadcrumbItemProps { export interface BreadcrumbItemProps {
separator?: React.ReactNode; separator?: React.ReactNode;
href?: string; href?: string;
} }

View File

@ -4,9 +4,9 @@ import splitObject from '../_util/splitObject';
const prefix = 'ant-btn-group-'; const prefix = 'ant-btn-group-';
type ButtonSize = 'small' | 'large' export type ButtonSize = 'small' | 'large'
interface ButtonGroupProps { export interface ButtonGroupProps {
size?: ButtonSize; size?: ButtonSize;
style?: React.CSSProperties; style?: React.CSSProperties;
className?: string; className?: string;

View File

@ -24,11 +24,11 @@ function insertSpace(child) {
return child; return child;
} }
type ButtonType = 'primary' | 'ghost' | 'dashed' export type ButtonType = 'primary' | 'ghost' | 'dashed'
type ButtonShape = 'circle' | 'circle-outline' export type ButtonShape = 'circle' | 'circle-outline'
type ButtonSize = 'small' | 'large' export type ButtonSize = 'small' | 'large'
interface ButtonProps { export interface ButtonProps {
type?: ButtonType; type?: ButtonType;
htmlType?: string; htmlType?: string;
icon?: string; icon?: string;

View File

@ -16,7 +16,7 @@ function zerofixed(v) {
return `${v}`; return `${v}`;
} }
interface CalendarContext { export interface CalendarContext {
antLocale?: { antLocale?: {
Calendar?: any Calendar?: any
}; };

View File

@ -2,7 +2,7 @@ import * as React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import splitObject from '../_util/splitObject'; import splitObject from '../_util/splitObject';
interface CardProps { export interface CardProps {
title?: React.ReactNode; title?: React.ReactNode;
extra?: React.ReactNode; extra?: React.ReactNode;
bordered?: boolean; bordered?: boolean;

View File

@ -9,7 +9,7 @@ import RangePicker from './RangePicker';
import Calendar from './Calendar'; import Calendar from './Calendar';
import { TimePickerProps } from '../time-picker'; import { TimePickerProps } from '../time-picker';
interface PickerProps { export interface PickerProps {
format?: string; format?: string;
disabled?: boolean; disabled?: boolean;
style?: React.CSSProperties; style?: React.CSSProperties;
@ -19,7 +19,7 @@ interface PickerProps {
getCalendarContainer?: (trigger) => React.ReactNode; getCalendarContainer?: (trigger) => React.ReactNode;
} }
interface SinglePickerProps { export interface SinglePickerProps {
value?: moment.Moment; value?: moment.Moment;
defaultValue?: moment.Moment; defaultValue?: moment.Moment;
defaultPickerValue?: moment.Moment; defaultPickerValue?: moment.Moment;

View File

@ -70,7 +70,7 @@ export interface FormComponentProps {
form: WrappedFormUtils; form: WrappedFormUtils;
} }
class FormComponent extends React.Component<FormComponentProps, {}> { export class FormComponent extends React.Component<FormComponentProps, {}> {
} }
export interface ComponentDecorator { export interface ComponentDecorator {

View File

@ -27,7 +27,7 @@ function clearNextFrameAction(nextFrameId) {
} }
} }
interface AutoSizeType { export interface AutoSizeType {
minRows?: number; minRows?: number;
maxRows?: number; maxRows?: number;
}; };

View File

@ -7,7 +7,7 @@ import splitObject from '../_util/splitObject';
const stringOrNumber = PropTypes.oneOfType([PropTypes.string, PropTypes.number]); const stringOrNumber = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
const objectOrNumber = PropTypes.oneOfType([PropTypes.object, PropTypes.number]); const objectOrNumber = PropTypes.oneOfType([PropTypes.object, PropTypes.number]);
interface ColSize { export interface ColSize {
span?: number; span?: number;
order?: number; order?: number;
offset?: number; offset?: number;

View File

@ -5,7 +5,7 @@ import animation from '../_util/openAnimation';
function noop() { function noop() {
} }
interface SelectParam { export interface SelectParam {
key: string; key: string;
keyPath: Array<string>; keyPath: Array<string>;
item: any; item: any;
@ -13,7 +13,7 @@ interface SelectParam {
selectedKeys: Array<string>; selectedKeys: Array<string>;
} }
interface ClickParam { export interface ClickParam {
key: string; key: string;
keyPath: Array<string>; keyPath: Array<string>;
item: any; item: any;

View File

@ -57,7 +57,7 @@ type ConfigContent = React.ReactNode;
type ConfigDuration = number; type ConfigDuration = number;
type ConfigOnClose = () => void; type ConfigOnClose = () => void;
interface ConfigOptions { export interface ConfigOptions {
top?: number; top?: number;
duration?: number; duration?: number;
prefixCls?: string; prefixCls?: string;

View File

@ -3,7 +3,7 @@ import { PropTypes } from 'react';
import RcSelect, { Option, OptGroup } from 'rc-select'; import RcSelect, { Option, OptGroup } from 'rc-select';
import classNames from 'classnames'; import classNames from 'classnames';
type SelectValue = string | string[] | Array<{ key: string, label: React.ReactNode }>; export type SelectValue = string | string[] | Array<{ key: string, label: React.ReactNode }>;
export interface SelectProps { export interface SelectProps {
prefixCls?: string; prefixCls?: string;

View File

@ -2,14 +2,14 @@ import * as React from 'react';
import { PropTypes } from 'react'; import { PropTypes } from 'react';
import RcSlider from 'rc-slider'; import RcSlider from 'rc-slider';
interface SliderMarks { export interface SliderMarks {
[key: number]: React.ReactNode | { [key: number]: React.ReactNode | {
style: React.CSSProperties, style: React.CSSProperties,
label: React.ReactNode, label: React.ReactNode,
}; };
} }
type SliderValue = number | [number, number]; export type SliderValue = number | [number, number];
export interface SliderProps { export interface SliderProps {
range?: boolean; range?: boolean;

View File

@ -33,7 +33,7 @@ const defaultPagination = {
onShowSizeChange: noop, onShowSizeChange: noop,
}; };
interface TableRowSelection { export interface TableRowSelection {
type?: 'checkbox' | 'radio'; type?: 'checkbox' | 'radio';
selectedRowKeys?: string[]; selectedRowKeys?: string[];
onChange?: (selectedRowKeys: string[], selectedRows: Object[]) => any; onChange?: (selectedRowKeys: string[], selectedRows: Object[]) => any;
@ -42,7 +42,7 @@ interface TableRowSelection {
onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any; onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any;
} }
interface TableColumnConfig { export interface TableColumnConfig {
title?: React.ReactNode; title?: React.ReactNode;
key?: string; key?: string;
dataIndex?: string; dataIndex?: string;
@ -87,7 +87,7 @@ export interface TableProps {
childrenColumnName?: 'string'; childrenColumnName?: 'string';
} }
interface TableContext { export interface TableContext {
antLocale?: { antLocale?: {
Table?: any, Table?: any,
}; };

View File

@ -4,8 +4,8 @@ import { cloneElement } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import Icon from '../icon'; import Icon from '../icon';
type TabsType = 'line' | 'card' | 'editable-card' export type TabsType = 'line' | 'card' | 'editable-card'
type TabsPosition = 'top' | 'right' | 'bottom' | 'left'; export type TabsPosition = 'top' | 'right' | 'bottom' | 'left';
export interface TabsProps { export interface TabsProps {
activeKey?: string; activeKey?: string;

View File

@ -4,7 +4,7 @@ import RcTooltip from 'rc-tooltip';
import getPlacements from '../popover/placements'; import getPlacements from '../popover/placements';
import classNames from 'classnames'; import classNames from 'classnames';
type PopoverPlacement = export type PopoverPlacement =
'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'top' | 'left' | 'right' | 'bottom' | 'topLeft' |
'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' |
'leftBottom' | 'rightTop' | 'rightBottom' 'leftBottom' | 'rightTop' | 'rightBottom'

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
interface TreeData { export interface TreeData {
key: string; key: string;
value: string; value: string;
label: React.ReactNode; label: React.ReactNode;

View File

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
type UploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed' export type UploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed'
export interface HttpRequestHeader { export interface HttpRequestHeader {
[key: string]: string; [key: string]: string;
@ -18,7 +18,7 @@ export interface File {
originFileObj?: File; originFileObj?: File;
} }
interface UploadChangeParam { export interface UploadChangeParam {
file: File; file: File;
fileList: Array<File>; fileList: Array<File>;
event?: { percent: number }; event?: { percent: number };