diff --git a/src/charm/src/index.d.ts b/src/charm/src/index.d.ts index c7a6700..da1c5fa 100644 --- a/src/charm/src/index.d.ts +++ b/src/charm/src/index.d.ts @@ -9,11 +9,10 @@ declare namespace Charm { * the state changes, all subscribers are notified. * * @param state The next state or a function that produces the next state. - * @returns The current state, if no arguments are provided. + * @returns The current state. */ - interface Atom { - (): State; - (nextState: State | ((prevState: State) => State)): void; + interface Atom extends Selector { + (nextState: State | ((prevState: State) => State)): State; } /** @@ -28,6 +27,7 @@ declare namespace Charm { * A function that depends on one or more atoms and produces a value. Can be * used to derive state from atoms. * + * @deprecated Use `Selector` instead. * @returns The current state. */ type Molecule = Selector;