mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-11-25 17:06:52 +01:00
15 lines
355 B
JavaScript
15 lines
355 B
JavaScript
|
'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
|
||
|
}
|