18 lines
390 B
TypeScript
18 lines
390 B
TypeScript
import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
|
import type { Session } from "~libraries/auth/mod.ts";
|
|
import type { Sockets } from "~libraries/socket/sockets.ts";
|
|
|
|
export const asyncLocalStorage = new AsyncLocalStorage<{
|
|
session?: Session;
|
|
info: {
|
|
method: string;
|
|
start: number;
|
|
end?: number;
|
|
};
|
|
sockets?: Sockets;
|
|
response: {
|
|
headers: Headers;
|
|
};
|
|
}>();
|