@@ -33,7 +33,7 @@ export class LoggingDatabaseOperations implements DatabaseOperations {
3333 return this . wrapped . engineKind ;
3434 }
3535
36- private sanitizeValue ( value : any ) : string {
36+ private sanitizeValue ( value : unknown ) : string {
3737 if ( value === null ) return 'null' ;
3838 if ( value === undefined ) return 'undefined' ;
3939 if ( typeof value === 'string' ) {
@@ -57,14 +57,17 @@ export class LoggingDatabaseOperations implements DatabaseOperations {
5757
5858 // Constrain T to only callable (function) members of DatabaseOperations,
5959 // excluding non-function properties like `engineKind` (which is a Promise).
60- private async logAndDelegate < T extends { [ K in keyof DatabaseOperations ] : DatabaseOperations [ K ] extends ( ...args : any ) => any ? K : never } [ keyof DatabaseOperations ] > (
60+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
61+ private async logAndDelegate < T extends { [ K in keyof DatabaseOperations ] : DatabaseOperations [ K ] extends ( ...args : any [ ] ) => any ? K : never } [ keyof DatabaseOperations ] > (
6162 message : string ,
6263 isWrite : boolean ,
6364 method : T ,
64- ...args : Parameters < Extract < DatabaseOperations [ T ] , ( ...args : any ) => any > >
65- ) : Promise < ReturnType < Extract < DatabaseOperations [ T ] , ( ...args : any ) => any > > > {
65+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
66+ ...args : Parameters < Extract < DatabaseOperations [ T ] , ( ...args : any [ ] ) => any > >
67+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
68+ ) : Promise < ReturnType < Extract < DatabaseOperations [ T ] , ( ...args : any [ ] ) => any > > > {
6669 this . log ( message , isWrite ) ;
67- return ( this . wrapped [ method ] as any ) ( ...args ) ;
70+ return ( this . wrapped [ method ] as CallableFunction ) ( ...args ) ;
6871 }
6972
7073 private log ( message : string , isWrite : boolean = false ) {
0 commit comments