import TestExclude from 'test-exclude' ; interface ExcludeOptions { cwd ? : string ; include ? : string | string [ ] ; exclude ? : string | string [ ] ; extension ? : string | string [ ] ; excludeNodeModules ? : boolean ; } param opts returns export function compileExclude ( opts ) { const exclude = new TestExclude ( { cwd : opts . cwd , include : opts . include , exclude : opts . exclude , extension : opts . extension , excludeNodeModules : opts . excludeNodeModules , } ) ; return ( filename ) => ! exclude . shouldInstrument ( filename ) ; }