(target)
| 16 | } |
| 17 | |
| 18 | function validateTargetContract(target) { |
| 19 | invariant(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); |
| 20 | invariant(typeof target.hover === 'function', 'Expected hover to be a function.'); |
| 21 | invariant(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); |
| 22 | } |
| 23 | |
| 24 | function validateType(type, allowArray) { |
| 25 | if (allowArray && isArray(type)) { |