import * as ts from "typescript" ; export abstract class NodeWalker { public walk ( node ) { this . visitNode ( node ) ; } protected visitNode ( node ) { this . walkChildren ( node ) ; } protected walkChildren ( node ) { ts . forEachChild ( node , ( child ) => this . visitNode ( child ) ) ; } }