import type * as ts from 'typescript' ; import micromatch from 'micromatch' ; import { GetOptionByKey } from './options' ; export type TsAutoMockFilesOption = string | string [ ] | undefined ; export function GetIsFilesExcludedFromOptions ( ) { const filesOption = GetOptionByKey ( 'files' ) ; if ( ! filesOption ) { return ( _ ) : boolean => false ; } return ( file ) : boolean => ! micromatch . isMatch ( file . fileName , filesOption ) ; }