function evaluateSourceFileAsNamespaceObject({ node, environment, evaluate, typeChecker, stack, statementTraversalStack }) {
    // Create a new ObjectLiteral based on the Object implementation from the Realm since this must not be the same as in the parent executing context
    // Otherwise, instanceof checks would fail
    const objectCtor = getFromLexicalEnvironment(node, environment, "Object").literal;
    const namespaceObject = objectCtor.create(objectCtor.prototype);
    const moduleSymbol = typeChecker.getSymbolAtLocation(node);
    if (moduleSymbol != null) {
        const exports = moduleSymbol.exports;
        if (exports != null) {
            for (const [identifier, symbol] of exports.entries()) {
                const valueDeclaration = symbol.valueDeclaration;
                if (valueDeclaration == null)
                    return;
                evaluate.declaration(valueDeclaration, environment, statementTraversalStack);
                namespaceObject[identifier] = stack.pop();
            }
        }
    }
    stack.push(namespaceObject);
}
/**
 * Evaluates, or attempts to evaluate, a SourceFile as a namespace object
 */
Evaluates, or attempts to evaluate, a SourceFile as a namespace object
Evaluates or attempts to evaluate a SourceFile as a namespace object
function evaluateSourceFileAsNamespaceObject({ node, environment, evaluate, typeChecker, stack, statementTraversalStack }) {
    const objectCtor = getFromLexicalEnvironment(node, environment, "Object").literal;
    const namespaceObject = objectCtor.create(objectCtor.prototype);
    const moduleSymbol = typeChecker.getSymbolAtLocation(node);
    if (moduleSymbol != null) {
        const exports = moduleSymbol.exports;
        if (exports != null) {
            for (const [identifier, symbol] of exports.entries()) {
                const valueDeclaration = symbol.valueDeclaration;
                if (valueDeclaration == null)
                    return;
                evaluate.declaration(valueDeclaration, environment, statementTraversalStack);
                namespaceObject[identifier] = stack.pop();
            }
        }
    }
    stack.push(namespaceObject);
}
function evaluateSourceFileAsNamespaceObject ( { node , environment , evaluate , typeChecker , stack , statementTraversalStack } ) { const objectCtor = getFromLexicalEnvironment ( node , environment , "Object" ) . literal ; const namespaceObject = objectCtor . create ( objectCtor . prototype ) ; const moduleSymbol = typeChecker . getSymbolAtLocation ( node ) ; if ( moduleSymbol != null ) { const exports = moduleSymbol . exports ; if ( exports != null ) { for ( const [ identifier , symbol ] of exports . entries ( ) ) { const valueDeclaration = symbol . valueDeclaration ; if ( valueDeclaration == null ) return ; evaluate . declaration ( valueDeclaration , environment , statementTraversalStack ) ; namespaceObject [ identifier ] = stack . pop ( ) ; } } } stack . push ( namespaceObject ) ; }
Evaluates, or attempts to evaluate, a SourceFile as a namespace object
Evaluates or attempts to evaluate a SourceFile as a namespace object
// Create a new ObjectLiteral based on the Object implementation from the Realm since this must not be the same as in the parent executing context // Otherwise, instanceof checks would fail