code: 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;
  }
docs: 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.