@@ -36,13 +36,13 @@ export class FilesystemLoader implements MetadataLoader {
3636 private logger ?: Logger
3737 ) { }
3838
39- async load < T = any > (
39+ async load (
4040 type : string ,
4141 name : string ,
4242 options ?: MetadataLoadOptions
43- ) : Promise < MetadataLoadResult < T > > {
43+ ) : Promise < MetadataLoadResult > {
4444 const startTime = Date . now ( ) ;
45- const { validate = true , useCache = true , ifNoneMatch } = options || { } ;
45+ const { validate : _validate = true , useCache = true , ifNoneMatch } = options || { } ;
4646
4747 try {
4848 // Find the file
@@ -87,7 +87,7 @@ export class FilesystemLoader implements MetadataLoader {
8787 const cached = this . cache . get ( cacheKey ) ! ;
8888 if ( cached . etag === stats . etag ) {
8989 return {
90- data : cached . data as T ,
90+ data : cached . data ,
9191 fromCache : true ,
9292 notModified : false ,
9393 etag : stats . etag ,
@@ -105,7 +105,7 @@ export class FilesystemLoader implements MetadataLoader {
105105 throw new Error ( `No serializer found for format: ${ stats . format } ` ) ;
106106 }
107107
108- const data = serializer . deserialize < T > ( content ) ;
108+ const data = serializer . deserialize ( content ) ;
109109
110110 // Update cache
111111 if ( useCache ) {
@@ -125,7 +125,7 @@ export class FilesystemLoader implements MetadataLoader {
125125 loadTime : Date . now ( ) - startTime ,
126126 } ;
127127 } catch ( error ) {
128- this . logger ?. error ( 'Failed to load metadata' , {
128+ this . logger ?. error ( 'Failed to load metadata' , undefined , {
129129 type,
130130 name,
131131 error : error instanceof Error ? error . message : String ( error ) ,
@@ -138,7 +138,7 @@ export class FilesystemLoader implements MetadataLoader {
138138 type : string ,
139139 options ?: MetadataLoadOptions
140140 ) : Promise < T [ ] > {
141- const { patterns = [ '**/*' ] , recursive = true , limit } = options || { } ;
141+ const { patterns = [ '**/*' ] , recursive : _recursive = true , limit } = options || { } ;
142142
143143 const typeDir = path . join ( this . rootDir , type ) ;
144144 const items : T [ ] = [ ] ;
@@ -184,7 +184,7 @@ export class FilesystemLoader implements MetadataLoader {
184184
185185 return items ;
186186 } catch ( error ) {
187- this . logger ?. error ( 'Failed to load many' , {
187+ this . logger ?. error ( 'Failed to load many' , undefined , {
188188 type,
189189 patterns,
190190 error : error instanceof Error ? error . message : String ( error ) ,
@@ -219,7 +219,7 @@ export class FilesystemLoader implements MetadataLoader {
219219 path : filePath ,
220220 } ;
221221 } catch ( error ) {
222- this . logger ?. error ( 'Failed to stat file' , {
222+ this . logger ?. error ( 'Failed to stat file' , undefined , {
223223 type,
224224 name,
225225 filePath,
@@ -245,7 +245,7 @@ export class FilesystemLoader implements MetadataLoader {
245245 return basename ;
246246 } ) ;
247247 } catch ( error ) {
248- this . logger ?. error ( 'Failed to list' , {
248+ this . logger ?. error ( 'Failed to list' , undefined , {
249249 type,
250250 error : error instanceof Error ? error . message : String ( error ) ,
251251 } ) ;
0 commit comments