function evaluateElementAccessExpression({ node, environment, evaluate, statementTraversalStack, typescript }) {
    const expressionResult = evaluate.expression(node.expression, environment, statementTraversalStack);
    const argumentExpressionResult = evaluate.expression(node.argumentExpression, environment, statementTraversalStack);
    const match = node.questionDotToken != null && expressionResult == null
        ? // If optional chaining are being used and the expressionResult is undefined or null, assign undefined to 'match'
            undefined
        : expressionResult[argumentExpressionResult];
    // If it is a function, wrap it in a lazy call to preserve implicit this bindings. This is to avoid losing the this binding or having to
    // explicitly bind a 'this' value
    if (typeof match === "function" && statementTraversalStack.includes(typescript.SyntaxKind.CallExpression)) {
        return {
            [LAZY_CALL_FLAG]: 0 /* CALL */,
            invoke: (overriddenThis, ...args) => overriddenThis != null && !isBindCallApply(match, environment)
                ? // eslint-disable-next-line @typescript-eslint/ban-types
                    expressionResult[argumentExpressionResult].call(overriddenThis, ...args)
                : expressionResult[argumentExpressionResult](...args)
        };
    }
    else
        return match;
}
/**
 * Evaluates, or attempts to evaluate, a ElementAccessExpression
 */
Evaluates, or attempts to evaluate, a ElementAccessExpression
Evaluates or attempts to evaluate a ElementAccessExpression
function evaluateElementAccessExpression({ node, environment, evaluate, statementTraversalStack, typescript }) {
    const expressionResult = evaluate.expression(node.expression, environment, statementTraversalStack);
    const argumentExpressionResult = evaluate.expression(node.argumentExpression, environment, statementTraversalStack);
    const match = node.questionDotToken != null && expressionResult == null
        ? 
            undefined
        : expressionResult[argumentExpressionResult];
    if (typeof match === "function" && statementTraversalStack.includes(typescript.SyntaxKind.CallExpression)) {
        return {
            [LAZY_CALL_FLAG]: 0 ,
            invoke: (overriddenThis, ...args) => overriddenThis != null && !isBindCallApply(match, environment)
                ? 
                    expressionResult[argumentExpressionResult].call(overriddenThis, ...args)
                : expressionResult[argumentExpressionResult](...args)
        };
    }
    else
        return match;
}
function evaluateElementAccessExpression ( { node , environment , evaluate , statementTraversalStack , typescript } ) { const expressionResult = evaluate . expression ( node . expression , environment , statementTraversalStack ) ; const argumentExpressionResult = evaluate . expression ( node . argumentExpression , environment , statementTraversalStack ) ; const match = node . questionDotToken != null && expressionResult == null ? undefined : expressionResult [ argumentExpressionResult ] ; if ( typeof match === "function" && statementTraversalStack . includes ( typescript . SyntaxKind . CallExpression ) ) { return { [ LAZY_CALL_FLAG ] : 0 , invoke : ( overriddenThis , ... args ) => overriddenThis != null && ! isBindCallApply ( match , environment ) ? expressionResult [ argumentExpressionResult ] . call ( overriddenThis , ... args ) : expressionResult [ argumentExpressionResult ] ( ... args ) } ; } else return match ; }
Evaluates, or attempts to evaluate, a ElementAccessExpression
Evaluates or attempts to evaluate a ElementAccessExpression
// If optional chaining are being used and the expressionResult is undefined or null, assign undefined to 'match' // If it is a function, wrap it in a lazy call to preserve implicit this bindings. This is to avoid losing the this binding or having to // explicitly bind a 'this' value /* CALL */ // eslint-disable-next-line @typescript-eslint/ban-types