export type SealedState = Record R>; export interface SealedAbstract, V, C = T> { is(key: keyof T): boolean; otherwise(otherwise: () => void): this; when(resolver: C, otherwise?: () => void): V; } export declare class SealedPartial> implements SealedAbstract, Partial> { protected key: keyof T; protected value?: V | undefined; protected _otherwise?: () => void; protected constructor(key: keyof T, value?: V | undefined); otherwise(otherwise: () => void): this; when(resolver: Partial, otherwise?: () => void): Undefined; is(key: keyof T): boolean; } export declare class Sealed> extends SealedPartial implements SealedAbstract { when(resolver: T, otherwise?: () => void): R; }