mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Fix types and lint
This commit is contained in:
parent
c5487ad1eb
commit
a3c3ec8070
@ -1,4 +1,3 @@
|
||||
import { render } from 'enzyme';
|
||||
import demoTest from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('breadcrumb', { skip: ['router.md', 'router-4.md'] });
|
||||
|
@ -95,7 +95,7 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
}
|
||||
|
||||
if (typeof loading !== 'boolean' && loading && loading.delay) {
|
||||
this.delayTimeout = setTimeout(() => this.setState({ loading }), loading.delay);
|
||||
this.delayTimeout = window.setTimeout(() => this.setState({ loading }), loading.delay);
|
||||
} else {
|
||||
this.setState({ loading });
|
||||
}
|
||||
@ -114,7 +114,7 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
// Add click effect
|
||||
this.setState({ clicked: true });
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = setTimeout(() => this.setState({ clicked: false }), 500);
|
||||
this.timeout = window.setTimeout(() => this.setState({ clicked: false }), 500);
|
||||
|
||||
const onClick = this.props.onClick;
|
||||
if (onClick) {
|
||||
|
@ -73,7 +73,7 @@ export default class Spin extends React.Component<SpinProps, any> {
|
||||
clearTimeout(this.debounceTimeout);
|
||||
}
|
||||
if (currentSpinning && !spinning) {
|
||||
this.debounceTimeout = setTimeout(() => this.setState({ spinning }), 200);
|
||||
this.debounceTimeout = window.setTimeout(() => this.setState({ spinning }), 200);
|
||||
if (this.delayTimeout) {
|
||||
clearTimeout(this.delayTimeout);
|
||||
}
|
||||
@ -82,7 +82,7 @@ export default class Spin extends React.Component<SpinProps, any> {
|
||||
if (this.delayTimeout) {
|
||||
clearTimeout(this.delayTimeout);
|
||||
}
|
||||
this.delayTimeout = setTimeout(() => this.setState({ spinning }), delay);
|
||||
this.delayTimeout = window.setTimeout(() => this.setState({ spinning }), delay);
|
||||
} else {
|
||||
this.setState({ spinning });
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ export default class TransferList extends React.Component<TransferListProps, any
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.timer = setTimeout(() => {
|
||||
this.timer = window.setTimeout(() => {
|
||||
this.setState({
|
||||
mounted: true,
|
||||
});
|
||||
@ -100,7 +100,7 @@ export default class TransferList extends React.Component<TransferListProps, any
|
||||
}
|
||||
// Manually trigger scroll event for lazy search bug
|
||||
// https://github.com/ant-design/ant-design/issues/5631
|
||||
this.triggerScrollTimer = setTimeout(() => {
|
||||
this.triggerScrollTimer = window.setTimeout(() => {
|
||||
const listNode = findDOMNode(this).querySelectorAll('.ant-transfer-list-content')[0];
|
||||
if (listNode) {
|
||||
triggerEvent(listNode, 'scroll');
|
||||
|
8
typings/custom-typings.d.ts
vendored
8
typings/custom-typings.d.ts
vendored
@ -78,12 +78,6 @@ declare module 'rc-form*';
|
||||
|
||||
declare module 'react-lazy-load';
|
||||
|
||||
declare var process: {
|
||||
env: {
|
||||
NODE_ENV: string
|
||||
}
|
||||
};
|
||||
|
||||
declare module "*.json" {
|
||||
const value: any;
|
||||
export const version: string;
|
||||
@ -91,5 +85,3 @@ declare module "*.json" {
|
||||
}
|
||||
|
||||
declare module "prop-types"
|
||||
|
||||
declare function require(name: string): any;
|
||||
|
Loading…
Reference in New Issue
Block a user