chore(types): adapt to new express type definitions

This commit is contained in:
Elian Doran
2024-12-10 22:35:23 +02:00
parent 6f371915bf
commit 5190b28d3c
13 changed files with 66 additions and 64 deletions

21
src/express.d.ts vendored Normal file
View File

@@ -0,0 +1,21 @@
import { Session } from "express-session";
export declare module "express-serve-static-core" {
interface Request {
session: Session & {
loggedIn: boolean;
},
headers: {
"x-local-date"?: string;
"x-labels"?: string;
"authorization"?: string;
"trilium-cred"?: string;
"x-csrf-token"?: string;
"trilium-component-id"?: string;
"trilium-local-now-datetime"?: string;
"trilium-hoisted-note-id"?: string;
}
}
}