Skip to content

Commit

Permalink
Use the omit-call-signature package
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodellosso committed Dec 20, 2024
1 parent 3c9f9af commit fc947f7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 0 additions & 8 deletions lib/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,6 @@ export type DbPicklist = {
};
};

/**
* Taken from https://stackoverflow.com/a/62502740/22099600
*/
export type OmitCallSignature<T> = { [K in keyof T]: T[K] } & (T extends new (
...args: infer R
) => infer S
? new (...args: R) => S
: unknown);

/**
* DO NOT GIVE TO CLIENTS!
Expand Down
2 changes: 1 addition & 1 deletion lib/api/ApiLib.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextApiRequest, NextApiResponse } from "next";
import { OmitCallSignature } from "@/lib/Types";
import OmitCallSignature from "omit-call-signature";
import toast from "react-hot-toast";

/**
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"next-pwa": "^5.6.0",
"next-seo": "^6.6.0",
"nodemailer": "^6.9.16",
"omit-call-signature": "^1.0.6",
"react": "18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-bootstrap": "^2.10.5",
Expand Down

0 comments on commit fc947f7

Please sign in to comment.