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

Version Path
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.50 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.49 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.48 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.46 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.44 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.43 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.42 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.41 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.40 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.39 node_modules/@babel/plugin-transform-typescript/lib/global-types.js
immosquare-cleaner-0.1.38 node_modules/@babel/plugin-transform-typescript/lib/global-types.js