declaredScope.js 308 B

12345678910
  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. };