ow
Version:
Function argument validation for humans
31 lines (27 loc) • 968 B
TypeScript
import { Predicate, type PredicateOptions, type Validator } from './predicate.js';
export declare class ArrayBufferPredicate<T extends ArrayBufferLike> extends Predicate<T> {
private readonly typeName;
/**
@hidden
*/
constructor(type: string, options?: PredicateOptions, validators?: Array<Validator<T>>);
/**
Test an array buffer to have a specific byte length.
@param byteLength - The byte length of the array buffer.
*/
byteLength(byteLength: number): this;
/**
Test an array buffer to have a minimum byte length.
@param byteLength - The minimum byte length of the array buffer.
*/
minByteLength(byteLength: number): this;
/**
Test an array buffer to have a minimum byte length.
@param length - The minimum byte length of the array buffer.
*/
maxByteLength(byteLength: number): this;
/**
@hidden
*/
protected withValidators(validators: Array<Validator<T>>): this;
}