From 316f8bf1002c3eb7873466c67314bc801414c548 Mon Sep 17 00:00:00 2001 From: Lukas Mertens Date: Sat, 12 Oct 2024 12:43:45 +0200 Subject: [PATCH] refactor(CreateConfig): use correct type for validateConfigContent The result of yaml.load is of type "unknown", not "object", so we can't assume the input to validateConfigContent is even an object. Noticed while fixing all errors caused by executing vue-tsc Signed-off-by: Lukas Mertens --- src/components/CreateConfig.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CreateConfig.vue b/src/components/CreateConfig.vue index 8fe99179..7b202935 100644 --- a/src/components/CreateConfig.vue +++ b/src/components/CreateConfig.vue @@ -162,7 +162,7 @@ function uploadConfigPrompt() { /** * Validates that the config content is a valid JSON or YAML config */ -async function validateConfigContent(content: object): Promise { +async function validateConfigContent(content: unknown): Promise { const ajv = new Ajv(); const schema = await getConfigJsonSchema(); const validate = ajv.compile(schema);