Skip to content

Commit fc947f7

Browse files
Use the omit-call-signature package
1 parent 3c9f9af commit fc947f7

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

lib/Types.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -566,14 +566,6 @@ export type DbPicklist = {
566566
};
567567
};
568568

569-
/**
570-
* Taken from https://stackoverflow.com/a/62502740/22099600
571-
*/
572-
export type OmitCallSignature<T> = { [K in keyof T]: T[K] } & (T extends new (
573-
...args: infer R
574-
) => infer S
575-
? new (...args: R) => S
576-
: unknown);
577569

578570
/**
579571
* DO NOT GIVE TO CLIENTS!

lib/api/ApiLib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NextApiRequest, NextApiResponse } from "next";
2-
import { OmitCallSignature } from "@/lib/Types";
2+
import OmitCallSignature from "omit-call-signature";
33
import toast from "react-hot-toast";
44

55
/**

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"next-pwa": "^5.6.0",
4343
"next-seo": "^6.6.0",
4444
"nodemailer": "^6.9.16",
45+
"omit-call-signature": "^1.0.6",
4546
"react": "18.3.1",
4647
"react-beautiful-dnd": "^13.1.1",
4748
"react-bootstrap": "^2.10.5",

0 commit comments

Comments
 (0)