From f89c0b75168f0a56e41fe37ccb4bf1fd187f8099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Morel?= Date: Tue, 18 Jun 2024 15:55:31 +0200 Subject: [PATCH] fix: use unknown instead of any for additional properties --- packages/core/src/getters/object.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/getters/object.ts b/packages/core/src/getters/object.ts index 0a38d6fcc..c246ed08a 100644 --- a/packages/core/src/getters/object.ts +++ b/packages/core/src/getters/object.ts @@ -130,7 +130,7 @@ export const getObject = ({ if (arr.length - 1 === index) { if (item.additionalProperties) { if (isBoolean(item.additionalProperties)) { - acc.value += `\n [key: string]: any;\n }`; + acc.value += `\n [key: string]: unknown;\n }`; } else { const resolvedValue = resolveValue({ schema: item.additionalProperties, @@ -166,7 +166,7 @@ export const getObject = ({ if (item.additionalProperties) { if (isBoolean(item.additionalProperties)) { return { - value: `{ [key: string]: any }` + nullable, + value: `{ [key: string]: unknown }` + nullable, imports: [], schemas: [], isEnum: false, @@ -206,7 +206,7 @@ export const getObject = ({ return { value: - (item.type === 'object' ? '{ [key: string]: any }' : 'unknown') + + (item.type === 'object' ? '{ [key: string]: unknown }' : 'unknown') + nullable, imports: [], schemas: [],