import { type Primitive } from 'ts-type-forge'; import { type Type } from '../type.mjs'; import { type ValidationErrorDetails } from '../utils/index.mjs'; export declare const refine: , R extends Base>({ baseType, is, defaultValue, typeName, getConstraintDetails, }: Readonly<{ baseType: Type; is: (a: Base) => a is R; defaultValue: R; typeName?: string; /** * Optional producer of structured error details for a value that passes the * base type but fails `is`. Used by the built-in constrained primitives * (`string` / `number` / `bigint`) to explain which constraint was violated; * user-defined refinements can omit it and fall back to a generic message. */ getConstraintDetails?: (a: Base) => ValidationErrorDetails | undefined; }>) => Type; //# sourceMappingURL=refine.d.mts.map