Files
TestMesa/backend/frontend/node_modules/tcomb/lib/forbidNewOperator.js
2024-12-17 14:36:15 -08:00

6 lines
268 B
JavaScript

var assert = require('./assert');
var getTypeName = require('./getTypeName');
module.exports = function forbidNewOperator(x, type) {
assert(!(x instanceof type), function () { return 'Cannot use the new operator to instantiate the type ' + getTypeName(type); });
};