From 8d6f1142bee57c983f376ee154a6605ccdf7984b Mon Sep 17 00:00:00 2001 From: AnastasiiaSvietlova Date: Tue, 26 Nov 2024 12:41:03 +0100 Subject: [PATCH] fix value type to unknown --- packages/plugin-client-ip/src/client-ip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-client-ip/src/client-ip.ts b/packages/plugin-client-ip/src/client-ip.ts index c6820d417..4fb6c0888 100644 --- a/packages/plugin-client-ip/src/client-ip.ts +++ b/packages/plugin-client-ip/src/client-ip.ts @@ -12,7 +12,7 @@ interface ExtendedPlugin extends Plugin { } interface ValidationOption { - validate: (value: boolean) => boolean + validate: (value: unknown) => boolean defaultValue: () => unknown message: string } @@ -38,7 +38,7 @@ const plugin: ExtendedPlugin = { collectUserIp: { defaultValue: () => true, message: 'should be true|false', - validate: (value: boolean) => value === true || value === false + validate: (value: unknown) => value === true || value === false } } }