import { HasTag, SomeSpec, Spec, SpecKind, SpecSuccess, SpecTag, SpectypesError } from './types.js'; /** * Creates a spec with custom constraint. * * @param spec Basis spec * @param constraint Function that performs additional validation */ export declare const limit: ) => boolean, ItemSpec extends Spec = SomeSpec>(spec: HasTag extends true ? SpectypesError<'optional', 'limit'> : HasTag extends true ? SpectypesError<'filter', 'limit'> : HasTag extends true ? SpectypesError<'lazy', 'limit'> : ItemSpec, constraint: Constraint) => Spec<[ 'limit', ...SpecTag ], SpecKind, Constraint extends (value: any) => value is infer U ? U : SpecSuccess>;