@apizr-io/class-utils
Version:
Package containing all class-validator function with all custom apizr class validation functions
14 lines (13 loc) • 677 B
TypeScript
import { ClassConstructor } from 'class-transformer';
import { ValidationOptions } from 'class-validator';
type RecordBaseType = 'string' | 'number' | 'boolean' | 'undefined' | 'null' | 'object';
type RecordAdvancedType = {
type: RecordAllowedType | RecordAllowedType[];
array?: boolean;
};
type RecordAllowedType = ClassConstructor<object> | RecordBaseType | RecordAdvancedType;
export type IsRecordValidateOptions = ValidationOptions & {
key?: 'string' | 'number';
};
export declare function IsRecord(allowedRecordType: RecordAllowedType | RecordAllowedType[], validationOptions?: IsRecordValidateOptions): (object: any, propertyName: string) => void;
export {};