@avonjs/avonjs
Version:
A fluent Node.js API generator.
33 lines (32 loc) • 1.06 kB
TypeScript
import type { AbstractMixable, AnyValue, NullableCallback } from '../Contracts';
declare const _default: <T extends AbstractMixable = AbstractMixable>(Parent: T) => (abstract new (...args: import("../Contracts").Args) => {
/**
* Indicates if the field is nullable.
*/
acceptsNullValues: boolean;
/**
* Values which will be replaced to null.
*/
nullValidator: NullableCallback;
/**
* Indicate that the field should be nullable.
*/
nullable(nullable?: boolean, validator?: NullableCallback): any;
/**
* Specify nullable values.
*/
nullValues(nullValidator: NullableCallback): any;
/**
* Determine if the field supports null values.
*/
isNullable(): boolean;
/**
* Determine if the given value is considered a valid null value if the field supports them.
*/
isValidNullValue(value: AnyValue): boolean;
/**
* Determine if the given value is considered null.
*/
valueIsConsideredNull(value: AnyValue): boolean;
}) & T;
export default _default;