schematics/src/ng-add/utils.js
function getSourceNodes(sourceFile) {
    const nodes = [sourceFile];
    const result = [];
    while (nodes.length > 0) {
        const node = nodes.shift();
        if (node) {
            result.push(node);
            if (node.getChildCount(sourceFile) >= 0) {
                nodes.unshift(...node.getChildren());
            }
        }
    }
    return result;
}
function getSourceNodes(sourceFile) {
    const nodes = [sourceFile];
    const result = [];
    while (nodes.length > 0) {
        const node = nodes.shift();
        if (node) {
            result.push(node);
            if (node.getChildCount(sourceFile) >= 0) {
                nodes.unshift(...node.getChildren());
            }
        }
    }
    return result;
}
function getSourceNodes ( sourceFile ) { const nodes = [ sourceFile ] ; const result = [ ] ; while ( nodes . length > 0 ) { const node = nodes . shift ( ) ; if ( node ) { result . push ( node ) ; if ( node . getChildCount ( sourceFile ) >= 0 ) { nodes . unshift ( ... node . getChildren ( ) ) ; } } } return result ; }
Get all the nodes from a source.
@param sourceFile The source file object.
@returns {Observable<ts.Node>} An observable of all the nodes in the source.
Get all the nodes from a source .