import { Developer } from './developer' ; export class DeveloperCollection { private developers : Developer [ ] ; constructor ( ) { this . developers = [ ] ; } getUserByGitHubHandle ( username ) { return this . developers . filter ( u => u . githubHandle === username ) . pop ( ) ; } getUserById ( id ) { return this . developers . filter ( u => u . id === id ) . pop ( ) ; } addDeveloper ( dev ) { this . developers . push ( dev ) ; } getAll ( ) { return this . developers ; } }