export interface MaskContext { strict?: boolean; context?: unknown; [key: string]: any; } export interface Masker { (value: TInput, ctx?: MaskContext): TOutput; _condition?: (val: TInput, ctx?: MaskContext) => boolean; _parentFn?: (val: any, ctx: MaskContext) => any; when(condition: (val: TInput, ctx?: MaskContext) => boolean): Masker; redact(label?: string): Masker; transform(fn: (val: TOutput) => TNew): Masker; } export declare function createMasker(fn: (val: I, ctx: MaskContext) => O): Masker; /** * Callable that supports both calling conventions shared by every built-in * masker: `maskX(value, opts)` for immediate masking, and `maskX(opts)` for * a reusable, chainable `Masker` builder consumed by `m.object()` schemas. */ export type DualModeMasker = { (value: string, opts?: TOpts): TOutput; (opts?: TOpts): Masker; }; /** * Builds a `DualModeMasker` from a single `(value, opts, ctx) => output` * implementation, so each masker module only has to define its masking * logic once instead of hand-rolling the direct-vs-builder dispatch. * * `coerce: true` preserves the `String(value)` coercion a few maskers * (card, phone) apply on their direct-call path for non-string input. */ export declare function createDualModeMasker(run: (value: string, opts: TOpts, ctx: MaskContext) => TOutput, config?: { coerce?: boolean; }): DualModeMasker; //# sourceMappingURL=masker.d.ts.map