babel/lib/6to5/transformation/templates/class-call-check.js

6 lines
150 B
JavaScript

(function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
});