preact-dnd
Version:
Drag and Drop for Preact (port from React DnD)
22 lines (20 loc) • 908 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = checkDecoratorArguments;
function checkDecoratorArguments(functionName, signature) {
if (process.env.NODE_ENV !== 'production') {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
for (var i = 0; i < args.length; i++) {
var arg = args[i];
if (arg && arg.prototype && arg.prototype.render) {
console.error( // eslint-disable-line no-console
'You seem to be applying the arguments in the wrong order. ' + ('It should be ' + functionName + '(' + signature + ')(Component), not the other way around. ') + 'Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#you-seem-to-be-applying-the-arguments-in-the-wrong-order');
return;
}
}
}
}