From 069646be3bb82a6df0db428386ce727251a9af8f Mon Sep 17 00:00:00 2001 From: Daniel Castro Date: Tue, 28 Nov 2023 14:30:29 -0800 Subject: [PATCH] Enable noImplicitAny option (#200) * Flipping noImplicitAny to true * Switch any to unknown --- src/converters/fromRpcNullable.ts | 2 +- src/converters/toCamelCase.ts | 2 +- tsconfig.json | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/converters/fromRpcNullable.ts b/src/converters/fromRpcNullable.ts index ee4e4d9..1c53b89 100644 --- a/src/converters/fromRpcNullable.ts +++ b/src/converters/fromRpcNullable.ts @@ -7,7 +7,7 @@ export function fromNullableMapping( nullableMapping: Record | null | undefined, originalMapping?: Record | null ): Record { - let converted = {}; + let converted: Record = {}; if (nullableMapping && Object.keys(nullableMapping).length > 0) { for (const key in nullableMapping) { converted[key] = nullableMapping[key].value || ''; diff --git a/src/converters/toCamelCase.ts b/src/converters/toCamelCase.ts index fc1c867..20e2b6a 100644 --- a/src/converters/toCamelCase.ts +++ b/src/converters/toCamelCase.ts @@ -7,7 +7,7 @@ export function toCamelCaseValue(data: unknown): unknown { } else if (Array.isArray(data)) { return data.map(toCamelCaseValue); } else { - const result = {}; + const result: Record = {}; for (const [key, value] of Object.entries(data)) { result[toCamelCaseKey(key)] = toCamelCaseValue(value); } diff --git a/tsconfig.json b/tsconfig.json index 3fd983d..aaecfa6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "module": "commonjs", "target": "es6", - "noImplicitAny": false, "strict": true, "noUnusedLocals": true, "outDir": "out",