Skip to content

Commit 8839bfb

Browse files
saby1101claude
andcommitted
fix: resolve TypeScript 6.0 build errors
- Add ignoreDeprecations: "6.0" and esModuleInterop: true to tsconfig (TS6 deprecated esModuleInterop=false and moduleResolution=node) - Annotate catch clauses as `err: any` in file-store.ts — TS6 now types catch bindings as unknown by default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a9ddf97 commit 8839bfb

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/file-store.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class LocalFileStore implements FileStore {
7474
contentType: "application/octet-stream",
7575
lastModified: stat.mtime,
7676
};
77-
} catch (err) {
77+
} catch (err: any) {
7878
if (err.code === "ENOENT") {
7979
return null;
8080
}
@@ -216,7 +216,7 @@ class AzureFileStore implements FileStore {
216216
contentType: properties.contentType || "application/octet-stream",
217217
lastModified: properties.lastModified || new Date(0),
218218
};
219-
} catch (err) {
219+
} catch (err: any) {
220220
if (err.statusCode === 404) {
221221
return null;
222222
}
@@ -299,7 +299,7 @@ class GCPFileStore implements FileStore {
299299
? new Date(metadata.updated)
300300
: new Date(0),
301301
};
302-
} catch (err) {
302+
} catch (err: any) {
303303
if (err.code === 404) {
304304
return null;
305305
}
@@ -320,7 +320,7 @@ class S3FileStore implements FileStore {
320320
new S3.HeadObjectCommand({ Bucket: this.bucket, Key: filepath }),
321321
);
322322
return true;
323-
} catch (err) {
323+
} catch (err: any) {
324324
if (err instanceof S3.NoSuchKey) {
325325
return false;
326326
}
@@ -420,7 +420,7 @@ class S3FileStore implements FileStore {
420420
contentType: data.ContentType || "application/octet-stream",
421421
lastModified: data.LastModified || new Date(),
422422
};
423-
} catch (err) {
423+
} catch (err: any) {
424424
if (
425425
err instanceof S3.NoSuchKey ||
426426
err["$metadata"]?.httpStatusCode === 404

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
"declaration": true,
77
"diagnostics": false,
88
"emitDecoratorMetadata": false,
9-
"esModuleInterop": false,
9+
"esModuleInterop": true,
1010
"experimentalDecorators": false,
1111
"extendedDiagnostics": false,
1212
"forceConsistentCasingInFileNames": true,
1313
"importHelpers": false,
1414
"lib": ["ES2020"],
1515
"module": "commonjs",
16+
"ignoreDeprecations": "6.0",
1617
"moduleResolution": "node",
1718
"newLine": "LF",
1819
"noFallthroughCasesInSwitch": true,

0 commit comments

Comments
 (0)