/** * Runtime rollout channels. * * A channel controls what an already-installed copy DOES. It selects no package * and no version: a user on `beta` is running the same bytes as a user on * `stable` and taking a different set of behaviours out of them. That separation * is the whole point -- an experiment can be turned on for the people who want it * without shipping them a different build to roll back from. * * The channels are ORDERED, and a wider channel takes everything the narrower one * has. Without that, "available in beta" and "available in canary" would be two * unrelated sets and a canary user would silently lose a beta feature. */ export declare enum RolloutChannel { Stable = "stable", Beta = "beta", Canary = "canary", Dev = "dev" } export declare class RolloutConfigurationError extends Error { constructor(message: string); } /** Normalises a name the way both channels and feature names are normalised. */ export declare function normalise(value: string): string; export declare function channelOrder(channel: RolloutChannel): number; /** True when a copy on `have` is wide enough to include something needing `need`. */ export declare function channelAllows(have: RolloutChannel, need: RolloutChannel): boolean; export declare function allChannels(): readonly RolloutChannel[]; /** * Reads a channel name. * * An unreadable name falls back to `stable` rather than throwing, because the * thing asking is usually a hook with one job and no way to report a * configuration error -- and falling back to the NARROWEST channel is the only * safe direction to guess in. `strict` is for the inspector and the tests, which * both exist to tell a user their configuration is wrong. * * The refusal is returned rather than logged. A warning on stderr from inside a * hook is either invisible or corrupts a protocol stream, so the caller decides * where it goes. */ export declare function parseChannel(value: string | undefined, options?: { readonly strict?: boolean; }): { readonly channel: RolloutChannel; readonly refused: string | null; }; //# sourceMappingURL=channel.d.ts.map