From d5815cbec6bf008f16446ac328707a92533adac9 Mon Sep 17 00:00:00 2001 From: MapleLeaf <19603573+itsMapleLeaf@users.noreply.github.com> Date: Sun, 26 Dec 2021 11:56:34 -0600 Subject: [PATCH] omit: use except from type-fest which doesn't mess up tagged object unions --- src/helpers/omit.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/helpers/omit.ts b/src/helpers/omit.ts index 8dd20d8..bd44384 100644 --- a/src/helpers/omit.ts +++ b/src/helpers/omit.ts @@ -1,8 +1,10 @@ +import type { Except } from "type-fest" + // eslint-disable-next-line import/no-unused-modules export function omit( subject: Subject, - ...keys: Key[] -): Omit { + keys: Key[], +): Except { const result: any = {} for (const key in subject) { if (!keys.includes(key as unknown as Key)) {