mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
10 lines
238 B
TypeScript
10 lines
238 B
TypeScript
|
import warning from 'warning';
|
||
|
|
||
|
const warned: { [msg: string]: boolean} = {};
|
||
|
export default (valid: boolean, message: string): void => {
|
||
|
if (!valid && !warned[message]) {
|
||
|
warning(false, message);
|
||
|
warned[message] = true;
|
||
|
}
|
||
|
};
|