import * as ts from 'typescript' ; const transformer = context => { return sourceFile => { const visitor = ( node ) : ts . VisitResult < ts . Node > => { if ( ts . isExpressionStatement ( node ) ) { return [ node , node ] ; } return ts . visitEachChild ( node , visitor , context ) ; } ; return ts . visitNode ( sourceFile , visitor ) ; } ; } ; export default transformer ;