declaredScope.js 301 B

123456789
  1. 'use strict';
  2. exports.__esModule = true;
  3. exports.default = function declaredScope(context, name) {
  4. const references = context.getScope().references;
  5. const reference = references.find(x => x.identifier.name === name);
  6. if (!reference) return undefined;
  7. return reference.resolved.scope.type;
  8. };