From 5e03f464df2a7badd1c3382aaed7f810fd40bb19 Mon Sep 17 00:00:00 2001 From: qweered Date: Mon, 22 Apr 2024 02:39:44 +0300 Subject: [PATCH] fix: rename initState to callback in atom overload --- packages/core/src/atom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/atom.ts b/packages/core/src/atom.ts index 69068eadd..f67dbd8e7 100644 --- a/packages/core/src/atom.ts +++ b/packages/core/src/atom.ts @@ -671,7 +671,7 @@ function onCall(this: Action, cb: Fn): Unsubscribe { }) } -export function atom(initState: (ctx: CtxSpy) => T, name?: string): Atom +export function atom(callback: (ctx: CtxSpy) => T, name?: string): Atom export function atom(initState: T, name?: string): AtomMut export function atom( initState: T | ((ctx: CtxSpy) => T),