UNPKG

container.ts

Version:
16 lines (15 loc) 557 B
/// <reference types="node" /> import { Field } from "../../validate"; /** NodeValidate.isBuffer options. */ export interface IIsBuffer { /** Optional encoding for buffer. */ encoding?: BufferEncoding; } /** Validate that value is a valid Node.js Buffer. */ export declare function isBuffer(value?: string, options?: IIsBuffer): Buffer; export declare class BufferField extends Field<Buffer> { protected readonly options: IIsBuffer; constructor(options?: IIsBuffer); validate(value: string): Buffer; format(value: Buffer): string; }