deps: upgrade TypeScript to 2.6, close #8018

pull/8125/head
Benjy Cui 7 years ago
parent dbe451a199
commit 51785aa6eb

@ -1,7 +1,11 @@
import React from 'react';
import { findDOMNode } from 'react-dom';
export default class InputElement extends React.Component<any, any> {
export interface InputElementProps {
children: React.ReactElement<any>;
}
export default class InputElement extends React.Component<InputElementProps, any> {
private ele: HTMLInputElement;
focus = () => {
@ -12,7 +16,7 @@ export default class InputElement extends React.Component<any, any> {
}
saveRef = (ele: HTMLInputElement) => {
this.ele = ele;
const childRef = this.props.children.ref;
const { ref: childRef } = this.props.children as any;
if (typeof childRef === 'function') {
childRef(ele);
}

@ -29,9 +29,13 @@ export interface TextAreaProps extends AbstractInputProps {
onPressEnter?: React.FormEventHandler<any>;
}
export interface TextAreaState {
textareaStyles?: React.CSSProperties;
}
export type HTMLTextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
export default class TextArea extends React.Component<TextAreaProps & HTMLTextareaProps, any> {
export default class TextArea extends React.Component<TextAreaProps & HTMLTextareaProps, TextAreaState> {
static defaultProps = {
prefixCls: 'ant-input',
};
@ -39,7 +43,7 @@ export default class TextArea extends React.Component<TextAreaProps & HTMLTextar
nextFrameActionId: number;
state = {
textareaStyles: null,
textareaStyles: {},
};
private textAreaRef: HTMLTextAreaElement;

@ -152,7 +152,7 @@
"rimraf": "^2.5.4",
"stylelint": "^8.0.0",
"stylelint-config-standard": "^17.0.0",
"typescript": "~2.5.3",
"typescript": "~2.6.1",
"unified": "^6.1.5",
"values.js": "^1.0.3",
"xhr2": "^0.1.3"

Loading…
Cancel
Save