From 6899a4e6f99b9b96419124e76e008857d37d5c1e Mon Sep 17 00:00:00 2001 From: Daniel Castro Date: Mon, 27 Nov 2023 09:45:32 -0800 Subject: [PATCH 1/2] Flipping noImplicitAny to true --- 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..85799d9 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", From c7c873d2e8bbf49e4093878d88dd40cc00b54449 Mon Sep 17 00:00:00 2001 From: Daniel Castro Date: Tue, 28 Nov 2023 11:54:29 -0800 Subject: [PATCH 2/2] Switch any to unknown --- src/converters/toCamelCase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/converters/toCamelCase.ts b/src/converters/toCamelCase.ts index 85799d9..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: Record = {}; + const result: Record = {}; for (const [key, value] of Object.entries(data)) { result[toCamelCaseKey(key)] = toCamelCaseValue(value); }