///
import ISerializer, { InputOf, OutputOf, JSONOutputOf } from "./ISerializer";
declare type TInput = InputOf | null | undefined;
declare type TOutput = OutputOf | null;
declare type TJSONOutput = JSONOutputOf | null;
export declare class OptionalSerializer extends ISerializer, TOutput, TJSONOutput> {
readonly serializer: T;
constructor(serializer: T);
toJSON(value: TInput): TJSONOutput;
fromJSON(value: TJSONOutput): TOutput;
toBuffer(value: TInput): Buffer;
readFromBuffer(buffer: Buffer, offset?: number): {
res: TOutput;
newOffset: number;
};
}
export default function optional(serializer: T): OptionalSerializer;
export {};