about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-09-12 17:16:58 +0200
committerAlan Pearce2023-09-12 17:16:58 +0200
commit0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5 (patch)
treec098660f56e0a2fc671728c953f9f723d3a68749
parent2f6152539c540697290ec73a7c1b50b9f2db88c6 (diff)
downloadwebsite-0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5.tar.lz
website-0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5.tar.zst
website-0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5.zip
Give files map a proper type
-rw-r--r--src/index.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index ec1c296..e35368d 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -18,7 +18,13 @@ function getFilename(name: string): string {
   return path.join(publicDir, `${name}`);
 }
 
-let files: Map<string, any> = new Map();
+type File = {
+  filename: string;
+  size: number;
+  mtime: string;
+};
+
+let files = new Map<string, File>();
 
 function registerFile(pathname: string, absPath: string, stat: Stats): void {
   pathname = "/" + (pathname === "." || pathname === "./" ? "" : pathname);