@@ -90,13 +90,13 @@ export class CompositeCollectionValidator<T> implements MultiConstraintValidator
90
90
}
91
91
}
92
92
93
- export class CompositeMapValidator < T > implements MultiConstraintValidator < { [ key : string ] : T } > {
94
- private readonly referenceValidator : MultiConstraintValidator < { [ key : string ] : T } > ;
93
+ export class CompositeMapValidator < T > implements MultiConstraintValidator < Record < string , T > > {
94
+ private readonly referenceValidator : MultiConstraintValidator < Record < string , T > > ;
95
95
private readonly keyValidator : MultiConstraintValidator < string > ;
96
96
private readonly valueValidator : MultiConstraintValidator < T > ;
97
97
98
98
constructor (
99
- referenceValidator : MultiConstraintValidator < { [ key : string ] : T } > ,
99
+ referenceValidator : MultiConstraintValidator < Record < string , T > > ,
100
100
keyValidator : MultiConstraintValidator < string > ,
101
101
valueValidator : MultiConstraintValidator < T >
102
102
) {
@@ -105,7 +105,7 @@ export class CompositeMapValidator<T> implements MultiConstraintValidator<{ [key
105
105
this . valueValidator = valueValidator ;
106
106
}
107
107
108
- validate ( input : { [ key : string ] : T } | undefined | null , path : string ) : ValidationFailure [ ] {
108
+ validate ( input : Record < string , T > | undefined | null , path : string ) : ValidationFailure [ ] {
109
109
const retVal : ValidationFailure [ ] = [ ] ;
110
110
retVal . push ( ...this . referenceValidator . validate ( input , path ) ) ;
111
111
if ( input !== null && input !== undefined ) {
@@ -175,7 +175,7 @@ export class EnumValidator implements SingleConstraintValidator<string, EnumVali
175
175
}
176
176
}
177
177
178
- type LengthCheckable = string | { length : number } | { [ key : string ] : any } ;
178
+ type LengthCheckable = string | { length : number } | Record < string , any > ;
179
179
180
180
export class LengthValidator implements SingleConstraintValidator < LengthCheckable , LengthValidationFailure > {
181
181
private readonly min ?: number ;
0 commit comments