import { DataStream } from '../basic-types/DataStream'; export interface ITypeSchema { name: string; subtype?: string; encode?: (value: any, stream: DataStream) => void; decode?: (stream: DataStream) => any; validate?: (value: any) => boolean; coerce?: (value: any) => any; random?: () => any; defaultValue?: any; jsonEncode?: (arg: any) => any; jsonDecode?: (arg: any) => any; } /** * @class TypeSchema * @param options {Object} * @constructor * create a new type Schema */ export declare class TypeSchema implements ITypeSchema { name: string; encode?: (value: any, stream: DataStream) => void; decode?: (stream: DataStream) => any; jsonEncode?: (arg: any) => any; jsonDecode?: (arg: any) => any; validate?: (value: any) => boolean; coerce?: (value: any) => any; subtype?: string; defaultValue: any; constructor(options: ITypeSchema | any); /** * @method computer_default_value * @param defaultValue {*} the default value * @return {*} */ computer_default_value(defaultValue: any): any; /** * @method initialize_value * @param value * @param defaultValue * @return {*} */ initialize_value(value: any, defaultValue: any): any; } //# sourceMappingURL=type_schema.d.ts.map