MCPcopy
hub / github.com/codesandbox/codesandbox-client / registerType

Function registerType

packages/app/static/js/babel.6.26.js:709–723  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

707 var t = exports;
708
709 function registerType(type) {
710 var is = t["is" + type];
711 if (!is) {
712 is = t["is" + type] = function (node, opts) {
713 return t.is(type, node, opts);
714 };
715 }
716
717 t["assert" + type] = function (node, opts) {
718 opts = opts || {};
719 if (!is(node, opts)) {
720 throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts));
721 }
722 };
723 }
724
725 exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
726 exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;

Callers 1

babel.6.26.jsFile · 0.85

Calls 1

isFunction · 0.70

Tested by

no test coverage detected