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 classNames from 'classnames';
interface AlertProps {
export interface AlertProps {
/**
* Type of Alert styles, options:`success`, `info`, `warning`, `error`
*/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@ import { PropTypes } from 'react';
import RcSelect, { Option, OptGroup } from 'rc-select';
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 {
prefixCls?: string;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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