import { PolicyBuilderElement } from '~/src/types' ; function adoptedFilter ( item ) { return item . adopted !== false ; } export default function pickAdopted < T extends PolicyBuilderElement > ( collection ) { return collection ? collection . filter ( adoptedFilter ) : [ ] ; }