Sha256: a25f563e1c1fba6ca32cc602e85afc0bb4341921255a9be8907a87e64d61185c
Contents?: true
Size: 1.04 KB
Versions: 14
Compression:
Stored size: 1.04 KB
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GLOBAL_TYPES = void 0; exports.isGlobalType = isGlobalType; exports.registerGlobalType = registerGlobalType; const GLOBAL_TYPES = exports.GLOBAL_TYPES = new WeakMap(); function isGlobalType({ scope }, name) { if (scope.hasBinding(name)) return false; if (GLOBAL_TYPES.get(scope).has(name)) return true; console.warn(`The exported identifier "${name}" is not declared in Babel's scope tracker\n` + `as a JavaScript value binding, and "@babel/plugin-transform-typescript"\n` + `never encountered it as a TypeScript type declaration.\n` + `It will be treated as a JavaScript value.\n\n` + `This problem is likely caused by another plugin injecting\n` + `"${name}" without registering it in the scope tracker. If you are the author\n` + ` of that plugin, please use "scope.registerDeclaration(declarationPath)".`); return false; } function registerGlobalType(programScope, name) { GLOBAL_TYPES.get(programScope).add(name); } //# sourceMappingURL=global-types.js.map
Version data entries
14 entries across 14 versions & 1 rubygems