An interface meant to be implemented by MemberExpression, Identifier and ChainExpression and all Literal expressions

interface CanFindScope {
    findScope<V extends Context>(stack: Stack): Scope<V>;
    findScope<V extends Context>(
        stack: Stack,
        scope: Scope<Record<PropertyKey, V>>,
    ): Scope<V>;
    findScope<V extends Context>(
        stack: Stack,
        scope?: Scope<Record<PropertyKey, V>>,
    ): undefined | Scope<V>;
}

Implemented by

Methods

Methods

  • try to search for scope of this expression

    Type Parameters

    Parameters

    Returns Scope<V>

  • Type Parameters

    Parameters

    Returns Scope<V>

  • Type Parameters

    Parameters

    • stack: Stack
    • Optionalscope: Scope<Record<PropertyKey, V>>

    Returns undefined | Scope<V>