diff --git a/src/index.d.ts b/src/index.d.ts index 4bbbd31..335cf93 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -35,7 +35,7 @@ declare namespace Charm { * * @returns The current state. */ - type Molecule = () => State; + type Molecule = (...args: any[]) => State; /** * Infers the type of the state produced by the given molecule. diff --git a/src/types.luau b/src/types.luau index 16d19f2..43795f9 100644 --- a/src/types.luau +++ b/src/types.luau @@ -18,7 +18,7 @@ export type Atom = (() -> T) & (state: T | (T) -> T) -> T @template State The type of the state. @return The current state. ]=] -export type Molecule = () -> T +export type Molecule = (...any) -> T --[=[ Optional configuration for creating an atom.