From 6bc59f16b1eb7da0daf5ba8acbaf6e8c0307aecc Mon Sep 17 00:00:00 2001 From: Kanad Gupta <8854718+kanadgupta@users.noreply.github.com> Date: Thu, 21 Sep 2023 11:03:14 -0500 Subject: [PATCH] feat: enable TS strict mode (#87) --- src/index.ts | 2 +- tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 9dd6cf9..da036c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -57,7 +57,7 @@ function stripEmptyObjects(obj: any) { return cleanObj.filter(el => el !== undefined); } -export default function removeUndefinedObjects(obj?: T): T { +export default function removeUndefinedObjects(obj?: T): T | undefined { if (obj === undefined) { return undefined; } diff --git a/tsconfig.json b/tsconfig.json index 56c6786..23191b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "noImplicitAny": true, "outDir": "./dist", "skipLibCheck": true, + "strict": true, "target": "ES2020" }, "include": ["./src/**/*"]