import filesProperty from './files-property' ; import typesProperty from './types-property' ; import { Diagnostic , Context } from '../interfaces' ; type RuleFunction = ( context : Context ) => Diagnostic [ ] ; const rules = new Set < RuleFunction > ( [ filesProperty , typesProperty ] ) ; param context returns export default ( context ) => { const diagnostics = [ ] ; for ( const rule of rules ) { diagnostics . push ( ... rule ( context ) ) ; } return diagnostics ; } ;