提交 ab2dd310 编写于 作者: Z ztplz 提交者: 偏右

Add types for warning

上级 2dc3fbda
import warning from 'warning';
import * as warning from 'warning';
const warned: { [msg: string]: boolean } = {};
const warned: Record<string, boolean> = {};
export default (valid: boolean, message: string): void => {
if (!valid && !warned[message]) {
warning(false, message);
......
......@@ -2,7 +2,7 @@ import * as React from 'react';
import * as PropTypes from 'prop-types';
import RcDrawer from 'rc-drawer';
import createReactContext, { Context } from 'create-react-context';
import warning from 'warning';
import * as warning from 'warning';
import classNames from 'classnames';
import Icon from '../icon';
import { withConfigConsumer, ConfigConsumerProps } from '../config-provider';
......
......@@ -4,7 +4,7 @@ import RcSelect, { Option, OptGroup } from 'rc-select';
import classNames from 'classnames';
import { ConfigConsumer, ConfigConsumerProps, RenderEmptyHandler } from '../config-provider';
import omit from 'omit.js';
import warning from 'warning';
import * as warning from 'warning';
import Icon from '../icon';
import { tuple } from '../_util/type';
......
......@@ -14,8 +14,6 @@ declare module 'rc-util*';
declare module 'shallowequal';
declare module 'warning';
declare module 'css-animation*';
declare module 'rc-select';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册