From 5392fcd69b95e1eb223b2f01fca88cfc2f7fd9c9 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 26 Aug 2024 19:34:18 -0700 Subject: [PATCH] feat: add overload for nullable atoms --- src/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.d.ts b/src/index.d.ts index 94adf4c..4bbbd31 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -69,6 +69,9 @@ declare namespace Charm { */ function atom(state: State, options?: AtomOptions): Atom; + // Overload for no arguments + function atom(state?: State, options?: AtomOptions): Atom; + /** * Creates a read-only atom that derives its state from one or more atoms. * Used to avoid unnecessary recomputations if multiple listeners depend on