const isProduction: boolean = process.env.NODE_ENV === 'production';
export default function warning(condition: mixed, message: string): void {
if (!isProduction) {
if (condition) {
return;
}
const text: string = `Warning: ${message}`;
if (typeof console !== 'undefined') {
console.warn(text);
}
try {
throw Error(text);
} catch (x) {}
}
}