Forest.js Core Documentation - v1.2.3
    Preparing search index...

    Type Alias StoreValues<S>

    StoreValues: { [K in keyof S]: S[K] extends Store<infer T> ? T : never }

    Helper type to extract values from a StoreMap. Transforms a map of stores into a map of their inner values.

    Type Parameters

    • S extends StoreMap<any>

      StoreMap to extract values from

    const myStore = createStore({ value: "Hello" });
    const myStoreMap: StoreMap<{ myStore: string }> = { myStore };
    const myValues: StoreValues<typeof myStoreMap> = { myStore: "Hello" };