all repos — archive/homestead @ 0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5

My future indieweb platform

Give files map a proper type

Alan Pearce
commit

0ded4a2bf46a7c0e00523bf2f216fbfba12ba4d5

parent

2f6152539c540697290ec73a7c1b50b9f2db88c6

1 file changed, 7 insertions(+), 1 deletion(-)

jump to
M src/index.tssrc/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);