-
Notifications
You must be signed in to change notification settings - Fork 830
Open
Labels
flag: needs discussionIssues which needs discussion before implementation.Issues which needs discussion before implementation.type: featureIssues related to new features.Issues related to new features.
Description
Description
Please consider to improve ValidateIf
type and replace any
with Record<string, unknown>
or any stricter type option
this is an override that worked for us:
declare module 'class-validator' {
export declare function ValidateIf(
condition: (object: Record<string, unknown>, value: never) => boolean,
validationOptions?: ValidationOptions,
): PropertyDecorator;
}
I guess object type can be improved to be more generic - Record<string | number | symbol, unknown>
🤔
Proposed solution
Metadata
Metadata
Assignees
Labels
flag: needs discussionIssues which needs discussion before implementation.Issues which needs discussion before implementation.type: featureIssues related to new features.Issues related to new features.