MCPcopy Create free account
hub / github.com/babel/babel / currentThisScopeFlags

Method currentThisScopeFlags

packages/babel-parser/src/util/scope.ts:224–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222
223 // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.
224 currentThisScopeFlags(): ScopeFlag {
225 for (let i = this.scopeStack.length - 1; ; i--) {
226 const { flags } = this.scopeStack[i];
227 if (
228 flags & (ScopeFlag.VAR | ScopeFlag.CLASS_BASE) &&
229 !(flags & ScopeFlag.ARROW)
230 ) {
231 return flags;
232 }
233 }
234 }
235}

Callers 6

allowSuperMethod · 0.95
allowDirectSuperMethod · 0.95
allowNewTargetMethod · 0.95
inClassMethod · 0.95
inNonArrowFunctionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected