1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/eslint-module-utils/declaredScope.js

15 lines
355 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
"use strict"
exports.__esModule = true
exports.default = function declaredScope(context, name) {
let references = context.getScope().references
, i
for (i = 0; i < references.length; i++) {
if (references[i].identifier.name === name) {
break
}
}
if (!references[i]) return undefined
return references[i].resolved.scope.type
}