import { Project } from './project' ; export class ProjectSet { public readonly outDirs : string [ ] ; private readonly projects : Project [ ] ; constructor ( projects ) { this . projects = [ ... projects ] ; this . outDirs = this . projects . map ( ( p ) => p . getOutDir ( ) ) . filter ( ( p ) : p is string => typeof p === 'string' ) ; } filterByPaths ( paths ) { return new ProjectSet ( this . projects . filter ( ( p ) => paths . some ( ( f ) => p . isAbsolutePathSelected ( f ) || p . getConfigPaths ( ) . includes ( f ) ) ) ) ; } }