Skip to content

Commit

Permalink
upgrade ts 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Oct 19, 2016
1 parent 5179ffb commit 8afe396
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 2,630 deletions.
2 changes: 1 addition & 1 deletion components/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface AlertProps {
/** Additional content of Alert */
description?: React.ReactNode;
/** Callback when close Alert */
onClose?: React.MouseEventHandler;
onClose?: React.MouseEventHandler<any>;
/** Whether to show icon */
showIcon?: boolean;
style?: React.CSSProperties;
Expand Down
2 changes: 1 addition & 1 deletion components/back-top/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const easeInOutCubic = (t, b, c, d) => {

export interface BackTopProps {
visibilityHeight?: number;
onClick?: React.MouseEventHandler;
onClick?: React.MouseEventHandler<any>;
target?: () => HTMLElement | Window;
prefixCls?: string;
className?: string;
Expand Down
4 changes: 2 additions & 2 deletions components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export interface ButtonProps {
icon?: string;
shape?: ButtonShape;
size?: ButtonSize;
onClick?: React.FormEventHandler;
onMouseUp?: React.FormEventHandler;
onClick?: React.FormEventHandler<any>;
onMouseUp?: React.FormEventHandler<any>;
loading?: boolean;
disabled?: boolean;
style?: React.CSSProperties;
Expand Down
2 changes: 1 addition & 1 deletion components/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface CheckboxProps {
/** indeterminate 状态,只负责样式控制 */
indeterminate?: boolean;
/** 变化时回调函数 */
onChange?: React.FormEventHandler;
onChange?: React.FormEventHandler<any>;
style?: React.CSSProperties;
disabled?: boolean;
className?: string;
Expand Down
2 changes: 1 addition & 1 deletion components/dropdown/dropdown-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import splitObject from '../_util/splitObject';

export interface DropdownButtonProps {
type?: 'primary' | 'ghost' | 'dash';
onClick?: React.FormEventHandler;
onClick?: React.FormEventHandler<any>;
trigger?: 'click' | 'hover';
overlay: React.ReactNode;
visible?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface FormProps {
inline?: boolean;
vertical?: boolean;
form?: WrappedFormUtils;
onSubmit?: React.FormEventHandler;
onSubmit?: React.FormEventHandler<any>;
style?: React.CSSProperties;
className?: string;
prefixCls?: string;
Expand Down
2 changes: 1 addition & 1 deletion components/icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface IconProps {
type: string;
className?: string;
title?: string;
onClick?: React.MouseEventHandler;
onClick?: React.MouseEventHandler<any>;
spin?: boolean;
}

Expand Down
10 changes: 5 additions & 5 deletions components/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export interface InputProps {
readOnly?: boolean;
addonBefore?: React.ReactNode;
addonAfter?: React.ReactNode;
onPressEnter?: React.FormEventHandler;
onKeyDown?: React.FormEventHandler;
onChange?: React.FormEventHandler;
onClick?: React.FormEventHandler;
onBlur?: React.FormEventHandler;
onPressEnter?: React.FormEventHandler<any>;
onKeyDown?: React.FormEventHandler<any>;
onChange?: React.FormEventHandler<any>;
onClick?: React.FormEventHandler<any>;
onBlur?: React.FormEventHandler<any>;
autosize?: boolean | AutoSizeType;
autoComplete?: 'on' | 'off';
style?: React.CSSProperties;
Expand Down
2 changes: 1 addition & 1 deletion components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface ModalProps {
/** 点击确定回调*/
onOk?: () => void;
/** 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调*/
onCancel?: (e: React.MouseEvent) => void;
onCancel?: (e: React.MouseEvent<any>) => void;
/** 宽度*/
width?: string | number;
/** 底部内容*/
Expand Down
2 changes: 1 addition & 1 deletion components/radio/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getCheckedValue(children) {

export interface RadioGroupProps {
/** 选项变化时的回调函数*/
onChange?: React.FormEventHandler;
onChange?: React.FormEventHandler<any>;
/** 用于设置当前选中的值*/
value?: string | number;
/** 默认选中的值*/
Expand Down
2 changes: 1 addition & 1 deletion components/table/filterDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Checkbox from '../checkbox';
import Radio from '../radio';

export interface FilterDropdownMenuWrapperProps {
onClick?: React.MouseEventHandler;
onClick?: React.MouseEventHandler<any>;
children?: any;
className?: string;
}
Expand Down
4 changes: 2 additions & 2 deletions components/transfer/operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export interface TransferOperationProps {
className?: string;
leftArrowText?: string;
rightArrowText?: string;
moveToLeft?: React.FormEventHandler;
moveToRight?: React.FormEventHandler;
moveToLeft?: React.FormEventHandler<any>;
moveToRight?: React.FormEventHandler<any>;
leftActive?: boolean;
rightActive?: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions components/transfer/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function noop() {
export interface SearchProps {
prefixCls?: string;
placeholder?: string;
onChange?: (e: React.FormEvent) => void;
handleClear?: (e: React.MouseEvent) => void;
onChange?: (e: React.FormEvent<any>) => void;
handleClear?: (e: React.MouseEvent<any>) => void;
value?: any;
}

Expand Down
2 changes: 1 addition & 1 deletion components/tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface AntTreeNodeEvent {

export interface AntTreeNodeMouseEvent {
node: AntTreeNode;
event: React.MouseEventHandler;
event: React.MouseEventHandler<any>;
}

export interface TreeProps {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
"warning": "~3.0.0"
},
"devDependencies": {
"antd-tools": "^0.12.0",
"@types/react": "~0.14.41",
"@types/react-dom": "~0.14.18",
"antd-tools": "^0.13.0",
"babel-eslint": "^6.0.2",
"babel-jest": "^13.2.2",
"babel-plugin-import": "^1.0.0",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"strictNullChecks": false,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"jsx": "preserve",
Expand Down
6 changes: 0 additions & 6 deletions typings.json

This file was deleted.

70 changes: 0 additions & 70 deletions typings/globals/react-dom/index.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions typings/globals/react-dom/typings.json

This file was deleted.

Loading

0 comments on commit 8afe396

Please sign in to comment.