import { Matcher } from './Matcher'; export declare class SliceMatcher extends Matcher { readonly min: number; readonly max: number; readonly matcher: Matcher; constructor(min: number, max: number, matcher: Matcher); matchValue(value: unknown, keys: ReadonlyArray): value is T; } /** * Match zero or more elements. For use with `anyList`. * * @example * * ```ts * // matches `['foo', 1]` and `['foo', 'bar', 2]` and `['foo', 'bar', 'baz', 3]` but not `['foo']` or `['foo', 'bar']` * m.anyList([m.anyString(), m.zeroOrMore(), m.anyNumber()]) * ``` */ export declare function zeroOrMore(matcher?: Matcher): SliceMatcher; /** * Match one or more elements. For use with `anyList`. * * @example * * ```ts * // matches `['foo']` and `['foo', 'bar']` but not `[]` * m.anyList([m.oneOrMore()]) * ``` */ export declare function oneOrMore(matcher?: Matcher): SliceMatcher; /** * Options for {@link slice}. */ export interface SliceOptions { min?: number; max?: number; matcher?: Matcher; } /** * Match a slice of an array. For use with `anyList`. * * @example * * ```ts * // matches `['foo', 'bar', 'baz']` but not `['foo']` or `['foo', 'bar', 'baz', 'qux']` * m.anyList([m.anyString(), m.slice({ min: 1, max: 2 })]) * ``` */ export declare function slice({ min, max, matcher, }: SliceOptions): SliceMatcher; /** * Match a slice of an array of the given length. For use with `anyList`. * * @example * * ```ts * // matches `['foo', 'bar', 'baz']` but not `['foo']` or `['foo', 'bar', 'baz', 'qux']` * m.anyList([m.anyString(), m.slice(2)]) * ``` */ export declare function slice(length: number, matcher?: Matcher): SliceMatcher; /** * @deprecated Use `slice` instead. */ export declare function spacer(min?: number, max?: number): SliceMatcher;