// ✅ Filtering only
const opt1: QualityOptions = { minScore: 20, maxScore: 40 };
// ✅ Trimming only
const opt2: QualityOptions = { trim: true, trimThreshold: 15, trimWindow: 4 };
// ✅ Binning with platform preset (90% use case)
const opt3: QualityOptions = { bins: 3, preset: 'illumina' };
// ✅ Binning with custom boundaries (compile-time length validation!)
const opt4: QualityOptions = { bins: 2, boundaries: [20] };
const opt5: QualityOptions = { bins: 3, boundaries: [15, 30] };
const opt6: QualityOptions = { bins: 5, boundaries: [10, 20, 30, 35] };
// ✅ Combined: filtering + trimming + binning
const opt7: QualityOptions = {
minScore: 20,
trim: true,
trimThreshold: 15,
bins: 3,
preset: 'illumina'
};
// ❌ COMPILE ERROR: bins without preset or boundaries
const bad1: QualityOptions = { bins: 3 };
// ❌ COMPILE ERROR: Both preset AND boundaries
const bad2: QualityOptions = { bins: 3, preset: 'illumina', boundaries: [15, 30] };
// ❌ COMPILE ERROR: Wrong boundary length
const bad3: QualityOptions = { bins: 3, boundaries: [20] };
// ❌ COMPILE ERROR: preset without bins
const bad4: QualityOptions = { preset: 'illumina' };
Options for FASTQ quality operations
Supports filtering, trimming, and binning operations with compile-time type safety. Invalid option combinations are caught at compile-time rather than runtime.