A coupling-unit: one standalone item, or several coupled items fused together.
| 56 | |
| 57 | /** A coupling-unit: one standalone item, or several coupled items fused together. */ |
| 58 | interface Unit<T> { |
| 59 | key: string; // coupledKey, or the lone item's id |
| 60 | weight: number; |
| 61 | members: WorkItem<T>[]; |
| 62 | order: number; // first-appearance index, for deterministic tie-breaks |
| 63 | } |
| 64 | |
| 65 | function sanitizeWeight(w: number | undefined): number { |
| 66 | return typeof w === 'number' && Number.isFinite(w) && w > 0 ? w : 1; |
nothing calls this directly
no outgoing calls
no test coverage detected