i have interface for form validation
export interface SearchBarValidatorObj {
[k: string]: KeyObjectValidator;
}
is there a way to add "static" type to it? To have this functionality
export interface SearchBarValidatorObj {
required: string | boolean
[k: string]: KeyObjectValidator;
}
this is KeyObjectValidator interface
interface KeyObjectValidator {
value: string | number | RegExp;
message?: string;
}
Cheers!