import * as ts from 'typescript' ; import { isMacroImportDeclaration } from './isMacroImportDeclaration' ; param node returns export function getMacroImportDeclarations ( node ) { const declarations = node . statements . filter ( x => ts . isImportDeclaration ( x ) ) as ts . ImportDeclaration [ ] ; return declarations . filter ( isMacroImportDeclaration ) ; }