빌드
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { LoginCtx } from "./ReqLogin";
|
||||
import { SessionCtx } from "./StartSession";
|
||||
import type { LoginCtx } from "./ReqLogin";
|
||||
import type { SessionCtx } from "./StartSession";
|
||||
import type { ProcDecoratorGenerator } from "./base";
|
||||
import type { Request, Response } from "express";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LoginCtx } from "./ReqLogin";
|
||||
import { SessionCtx } from "./StartSession";
|
||||
import type { LoginCtx } from "./ReqLogin";
|
||||
import type { SessionCtx } from "./StartSession";
|
||||
import type { ProcDecoratorGenerator } from "./base";
|
||||
import type { Request, Response } from "express";
|
||||
import { delay } from "../../util/delay.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SessionCtx } from "./StartSession";
|
||||
import type { SessionCtx } from "./StartSession";
|
||||
import type { InvalidProc, ProcDecoratorGenerator } from "./base";
|
||||
|
||||
export type LoginCtx = {
|
||||
|
||||
@@ -13,7 +13,7 @@ export type SessionCtx = {
|
||||
|
||||
export function StartSession<Q extends object = Empty>(): ProcDecoratorGenerator<SessionCtx, Q> {
|
||||
return (inCtx) => {
|
||||
const raw: object = {};
|
||||
const raw: Record<string, unknown> = {};
|
||||
return {
|
||||
clearSession: () => Promise.resolve(),
|
||||
deleteValue: async (key: string) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ export type InvalidProc = InvalidResponse & {
|
||||
alreadyProcessed?: boolean;
|
||||
};
|
||||
|
||||
export interface ProcDecorator<Out, In extends object = Record<string, never>> {
|
||||
export interface ProcDecorator<Out extends object, In extends object = Record<string, never>> {
|
||||
(inCtx: In, req: Request, res: Response, isValidRoute: boolean): MayBePromise<Out | InvalidProc>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user