ts-essentials#DeepWritable TypeScript Examples
The following examples show how to use
ts-essentials#DeepWritable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: runFilters.ts From nextclade with MIT License | 6 votes |
export function runFilters(results: NextcladeResult[], filters: ResultsFilters) {
const { seqNamesFilter, mutationsFilter, aaFilter, cladesFilter, showGood, showMediocre, showBad, showErrors } =
filters
let filtered = results
if (seqNamesFilter) {
filtered = filtered.filter(filterBySeqName(seqNamesFilter))
}
if (mutationsFilter) {
filtered = filtered.filter(filterByNucleotideMutations(mutationsFilter))
}
if (aaFilter) {
filtered = filtered.filter(filterByAminoacidChanges(aaFilter))
}
if (cladesFilter) {
filtered = filtered.filter(filterByClades(cladesFilter))
}
filtered = filtered.filter(filterByQCIssues({ showGood, showMediocre, showBad, showErrors }))
return filtered as DeepWritable<typeof filtered>
}