From 013d7a4d4b7b7b4c1a76411ccd6dba8caad41487 Mon Sep 17 00:00:00 2001 From: Joe d'Elia Date: Fri, 11 Apr 2025 17:00:45 +0100 Subject: [PATCH] fix: correct return type for undefined initializeWithValue (defaults true) --- src/useStorageValue/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/useStorageValue/index.ts b/src/useStorageValue/index.ts index bc58ec8f..bf47f45e 100644 --- a/src/useStorageValue/index.ts +++ b/src/useStorageValue/index.ts @@ -118,7 +118,7 @@ type UseStorageValueValue< Default extends Type = Type, Initialize extends boolean | undefined = boolean | undefined, N = Default extends null | undefined ? null | Type : Type, - U = Initialize extends false ? undefined | N : N, + U = false extends Initialize ? undefined | N : N, > = U; export type UseStorageValueResult<