From 83d2ce46b5939ae6f26f77db98db0e253254a2fc Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 5 Aug 2025 17:04:19 -0700 Subject: [PATCH] fix(types): Mark defaultValue arguments required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems these arguments are always provided to the defaultValue function. (This doesn’t prevent the function from ignoring them: for example, `{ defaultValue: () => "hello" }` still satisfies this type.) Signed-off-by: Anders Kaseorg --- index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index f00a68a9..cc63bacd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -95,10 +95,10 @@ export interface UserConfig { defaultValue?: | string | (( - locale?: string, - namespace?: string, - key?: string, - value?: string + locale: string, + namespace: string, + key: string, + value: string ) => string) indentation?: number keepRemoved?: boolean | readonly RegExp[]