/** * Currency assessment for a single extension version. * * Compares an installed version against the versions available in an * ExtensionIndex, respecting an optional version constraint. * * @experimental This API is unstable and may change without notice. */ import * as Option from "effect/Option"; import type { Version } from "../../version-constraints/version-constraints.js"; import type { ExtensionIndex } from "../../registry/schema.js"; /** * Currency status for a single extension. * * - `current` — installed version matches the latest satisfying version. * - `update-available` — a newer version exists within the same major line. * - `major-update-available` — a newer major version exists. */ export type CurrencyStatus = "current" | "update-available" | "major-update-available"; /** * Result of a currency check for a single extension. * * @experimental This API is unstable and may change without notice. */ export interface CurrencyResult { readonly status: CurrencyStatus; readonly installedVersion: Version; /** Latest version satisfying the declared constraint. None when no version satisfies. */ readonly latestMatching: Option.Option; /** Absolute latest version in the index (regardless of constraint). */ readonly latestAvailable: Version; } /** * Assess version currency for a single extension. * * @param installedVersion - Currently installed version. * @param constraint - Optional version constraint from settings (e.g. `^1.0.0`). * @param index - Extension index containing all available versions (newest-first). */ export declare const checkCurrency: (installedVersion: Version, constraint: Option.Option, index: ExtensionIndex) => CurrencyResult; //# sourceMappingURL=check-currency.d.ts.map