@@ -31,9 +31,9 @@ export class CompositeValidator<T> implements MultiConstraintValidator<T> {
31
31
}
32
32
33
33
validate ( input : T | undefined | null , memberName : string ) : ValidationFailure [ ] {
34
- let retVal : ValidationFailure [ ] = [ ] ;
35
- for ( let v of this . validators ) {
36
- let failure = v . validate ( input , memberName ) ;
34
+ const retVal : ValidationFailure [ ] = [ ] ;
35
+ for ( const v of this . validators ) {
36
+ const failure = v . validate ( input , memberName ) ;
37
37
if ( failure ) {
38
38
retVal . push ( failure ) ;
39
39
}
@@ -52,7 +52,7 @@ export class CompositeStructureValidator<T> implements MultiConstraintValidator<
52
52
}
53
53
54
54
validate ( input : T | undefined | null , memberName : string ) : ValidationFailure [ ] {
55
- let retVal : ValidationFailure [ ] = [ ] ;
55
+ const retVal : ValidationFailure [ ] = [ ] ;
56
56
retVal . push ( ...this . referenceValidator . validate ( input , memberName ) ) ;
57
57
if ( input !== null && input !== undefined ) {
58
58
retVal . push ( ...this . structureValidator ( input ) ) ;
@@ -71,10 +71,10 @@ export class CompositeCollectionValidator<T> implements MultiConstraintValidator
71
71
}
72
72
73
73
validate ( input : Iterable < T > | undefined | null , memberName : string ) : ValidationFailure [ ] {
74
- let retVal : ValidationFailure [ ] = [ ] ;
74
+ const retVal : ValidationFailure [ ] = [ ] ;
75
75
retVal . push ( ...this . referenceValidator . validate ( input , memberName ) ) ;
76
76
if ( input !== null && input !== undefined ) {
77
- for ( let member of input ) {
77
+ for ( const member of input ) {
78
78
retVal . push ( ...this . memberValidator . validate ( member , memberName ) ) ;
79
79
}
80
80
}
@@ -98,7 +98,7 @@ export class CompositeMapValidator<T> implements MultiConstraintValidator<{ [key
98
98
}
99
99
100
100
validate ( input : { [ key : string ] : T } | undefined | null , memberName : string ) : ValidationFailure [ ] {
101
- let retVal : ValidationFailure [ ] = [ ] ;
101
+ const retVal : ValidationFailure [ ] = [ ] ;
102
102
retVal . push ( ...this . referenceValidator . validate ( input , memberName ) ) ;
103
103
if ( input !== null && input !== undefined ) {
104
104
Object . keys ( input ) . forEach ( ( key ) => {
@@ -278,9 +278,9 @@ export class UniqueItemsValidator implements SingleConstraintValidator<Array<any
278
278
return null ;
279
279
}
280
280
281
- let repeats = new Set < any > ( ) ;
282
- let uniqueValues = new Set < any > ( ) ;
283
- for ( let i of input ) {
281
+ const repeats = new Set < any > ( ) ;
282
+ const uniqueValues = new Set < any > ( ) ;
283
+ for ( const i of input ) {
284
284
if ( uniqueValues . has ( i ) ) {
285
285
repeats . add ( i ) ;
286
286
} else {
0 commit comments