@s-libs/signal-store
    Preparing search index...

    Interface Store<T>

    interface Store<T> {
        assign: IfCouldBe<
            T,
            any[]
            | Nil
            | Primitive,
            never,
            (value: Partial<T>) => void,
        >;
        mutate: <const A extends any[]>(
            func: (state: T, ...args: A) => void,
            ...args: A,
        ) => void;
        nonNull: Store<NonNullable<T>>;
        state: T;
        update: <const A extends any[]>(
            func: (state: T, ...args: A) => T,
            ...args: A,
        ) => void;
        <K extends string | number | symbol>(attr: K): IfCouldBe<T, Nil>;
    }

    Type Parameters

    • T

    Hierarchy

    • GetSlice<T>
      • Store
    Index

    Properties

    assign: IfCouldBe<
        T,
        any[]
        | Nil
        | Primitive,
        never,
        (value: Partial<T>) => void,
    >
    mutate: <const A extends any[]>(
        func: (state: T, ...args: A) => void,
        ...args: A,
    ) => void
    nonNull: Store<NonNullable<T>>
    state: T
    update: <const A extends any[]>(
        func: (state: T, ...args: A) => T,
        ...args: A,
    ) => void