Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 445 Bytes

checker-global.md

File metadata and controls

13 lines (11 loc) · 445 Bytes

Global Namespace Merging

Within initializeTypeChecker the following code exists:

// Initialize global symbol table
forEach(host.getSourceFiles(), file => {
    if (!isExternalModule(file)) {
        mergeSymbolTable(globals, file.locals);
    }
});

Which basically merges all the global symbols into the let globals: SymbolTable = {}; (in createTypeChecker) SymbolTable. mergeSymbolTable primarily calls mergeSymbol.