diff options
author | Alan Pearce | 2023-09-12 17:16:58 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-12 17:16:58 +0200 |
commit | 0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5 (patch) | |
tree | c098660f56e0a2fc671728c953f9f723d3a68749 /src | |
parent | 2f6152539c540697290ec73a7c1b50b9f2db88c6 (diff) | |
download | homestead-0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5.tar.lz homestead-0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5.tar.zst homestead-0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5.zip |
Give files map a proper type
Diffstat (limited to 'src')
-rw-r--r-- | src/index.ts | 8 |
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); |