docs/libs/typescript.js
function tryEmitStartOfVariableDeclarationList(decl) {
                if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) {
                    // variables in variable declaration list were already hoisted
                    return false;
                }
                if (convertedLoopState && (ts.getCombinedNodeFlags(decl) & 3072 /* BlockScoped */) === 0) {
                    // we are inside a converted loop - this can only happen in downlevel scenarios
                    // record names for all variable declarations
                    for (var _a = 0, _b = decl.declarations; _a < _b.length; _a++) {
                        var varDecl = _b[_a];
                        hoistVariableDeclarationFromLoop(convertedLoopState, varDecl);
                    }
                    return false;
                }
                emitStart(decl);
                if (decl && languageVersion >= 2 /* ES6 */) {
                    if (ts.isLet(decl)) {
                        write("let ");
                    }
                    else if (ts.isConst(decl)) {
                        write("const ");
                    }
                    else {
                        write("var ");
                    }
                }
                else {
                    write("var ");
                }
                // Note here we specifically dont emit end so that if we are going to emit binding pattern
                // we can alter the source map correctly
                return true;
            }
function tryEmitStartOfVariableDeclarationList(decl) {
                if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) {
                    // variables in variable declaration list were already hoisted
                    return false;
                }
                if (convertedLoopState && (ts.getCombinedNodeFlags(decl) & 3072 /* BlockScoped */) === 0) {
                    // we are inside a converted loop - this can only happen in downlevel scenarios
                    // record names for all variable declarations
                    for (var _a = 0, _b = decl.declarations; _a < _b.length; _a++) {
                        var varDecl = _b[_a];
                        hoistVariableDeclarationFromLoop(convertedLoopState, varDecl);
                    }
                    return false;
                }
                emitStart(decl);
                if (decl && languageVersion >= 2 /* ES6 */) {
                    if (ts.isLet(decl)) {
                        write("let ");
                    }
                    else if (ts.isConst(decl)) {
                        write("const ");
                    }
                    else {
                        write("var ");
                    }
                }
                else {
                    write("var ");
                }
                // Note here we specifically dont emit end so that if we are going to emit binding pattern
                // we can alter the source map correctly
                return true;
            }
function tryEmitStartOfVariableDeclarationList ( decl ) { if ( shouldHoistVariable ( decl , /*checkIfSourceFileLevelDecl*/ true ) ) { // variables in variable declaration list were already hoisted return false ; } if ( convertedLoopState && ( ts . getCombinedNodeFlags ( decl ) & 3072 /* BlockScoped */ ) === 0 ) { // we are inside a converted loop - this can only happen in downlevel scenarios // record names for all variable declarations for ( var _a = 0 , _b = decl . declarations ; _a < _b . length ; _a ++ ) { var varDecl = _b [ _a ] ; hoistVariableDeclarationFromLoop ( convertedLoopState , varDecl ) ; } return false ; } emitStart ( decl ) ; if ( decl && languageVersion >= 2 /* ES6 */ ) { if ( ts . isLet ( decl ) ) { write ( "let " ) ; } else if ( ts . isConst ( decl ) ) { write ( "const " ) ; } else { write ( "var " ) ; } } else { write ( "var " ) ; } // Note here we specifically dont emit end so that if we are going to emit binding pattern // we can alter the source map correctly return true ; }
Returns true if start of variable declaration list was emitted.
Returns false if nothing was written - this can happen for source file level variable declarations
in system modules where such variable declarations are hoisted.
Returns true if start of variable declaration list was emitted . Returns false if nothing was written - this can happen for source file level variable declarations in system modules where such variable declarations are hoisted .