export interface Migration { readonly version: number; readonly name: string; readonly up: string; } export function computePending( appliedVersions: ReadonlySet, migrations: readonly Migration[], ): readonly Migration[] { return migrations .filter((m) => !appliedVersions.has(m.version)) .sort((a, b) => a.version - b.version); }