De CRLF @types/express

This commit is contained in:
zkldi
2021-11-22 01:59:52 +00:00
parent 28abed9be2
commit bcca7aff34
+27 -27
View File
@@ -1,27 +1,27 @@
import { Session, SessionData } from "express-session";
import { SYMBOL_TachiAPIAuth, SYMBOL_TachiData } from "../../src/lib/constants/tachi";
import { TachiRequestData, TachiSessionData } from "../../src/utils/types";
import { APITokenDocument } from "tachi-common";
export {};
// this only exists for testing context - it doesn't seem to work properly otherwise.
declare module "express-session" {
// Inject additional properties on express-session
interface SessionData {
tachi: TachiSessionData;
}
}
declare global {
namespace Express {
interface Request {
session: Session & Partial<SessionData>;
[SYMBOL_TachiData]?: Partial<TachiRequestData>;
// even though this is technically *not* present on every request
// it's always assigned in the main router, so its functionally equivalent.
[SYMBOL_TachiAPIAuth]: APITokenDocument;
}
}
}
import { Session, SessionData } from "express-session";
import { SYMBOL_TachiAPIAuth, SYMBOL_TachiData } from "../../src/lib/constants/tachi";
import { TachiRequestData, TachiSessionData } from "../../src/utils/types";
import { APITokenDocument } from "tachi-common";
export {};
// this only exists for testing context - it doesn't seem to work properly otherwise.
declare module "express-session" {
// Inject additional properties on express-session
interface SessionData {
tachi: TachiSessionData;
}
}
declare global {
namespace Express {
interface Request {
session: Session & Partial<SessionData>;
[SYMBOL_TachiData]?: Partial<TachiRequestData>;
// even though this is technically *not* present on every request
// it's always assigned in the main router, so its functionally equivalent.
[SYMBOL_TachiAPIAuth]: APITokenDocument;
}
}
}