From cc462bc19acfcc07d5eafbf33b2edc8ba835da73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 25 Sep 2023 19:29:35 -0400 Subject: [PATCH] chore: add typescript shims shims added for `mongoose-sequence`, `blueimp-md5`, and `bcryptjs` --- typings/blueimp-md5.ts | 2 ++ typings/express.d.ts | 20 ++++++++++++++++++++ typings/mongoose-sequence.d.ts | 1 + typings/next.d.ts | 14 ++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 typings/blueimp-md5.ts create mode 100644 typings/express.d.ts create mode 100644 typings/mongoose-sequence.d.ts create mode 100644 typings/next.d.ts diff --git a/typings/blueimp-md5.ts b/typings/blueimp-md5.ts new file mode 100644 index 0000000..a9aa6f8 --- /dev/null +++ b/typings/blueimp-md5.ts @@ -0,0 +1,2 @@ +declare module "blueimp-md5" +declare module "bcryptjs" \ No newline at end of file diff --git a/typings/express.d.ts b/typings/express.d.ts new file mode 100644 index 0000000..a5c1b14 --- /dev/null +++ b/typings/express.d.ts @@ -0,0 +1,20 @@ +import { Document } from "mongoose"; +import { IStory } from "~/models/stories"; +import { IUser } from "~/models/user"; +import {Request} from "express" + +declare global { + declare namespace Express { + interface Request { + newStory?: IStory, + user?: IUser; + files: any; + AddID?: string | number; + readStory?: IStory; + cidx?: number; + } + interface User { + [key: string]: any + } + } +} diff --git a/typings/mongoose-sequence.d.ts b/typings/mongoose-sequence.d.ts new file mode 100644 index 0000000..a4b0710 --- /dev/null +++ b/typings/mongoose-sequence.d.ts @@ -0,0 +1 @@ +declare module 'mongoose-sequence'; \ No newline at end of file diff --git a/typings/next.d.ts b/typings/next.d.ts new file mode 100644 index 0000000..a8b30bf --- /dev/null +++ b/typings/next.d.ts @@ -0,0 +1,14 @@ +import { Document } from "mongoose"; +import { IStory } from "~/models/stories"; +import { IUser } from "~/models/user"; + +declare module "next" { + export interface NextApiRequest { + newStory?: IStory, + user?: IUser; + files: any; + AddID?: string | number; + readStory?: IStory; + cidx?: number; + } +} \ No newline at end of file