Repository navigation
Typo error in docs #3564
Bug DescriptionHello, I would like to report a possible typo error in this section of the docs Where it says "export type CounterStore = CounterState & CounterActions" I think the operator should be an OR rather than AND: export type CounterStore = CounterState | CounterActions If I copy and paste the code snippet from the docs, I get an error: `import { createStore } from "zustand/vanilla" export type AuthState = { export type AuthActions = { type AuthStore = AuthState & AuthActions const initialState = { export const createCounterStore = (initState: AuthStore = initialState) => { Type '{ user: null; }' is not assignable to type 'AuthStore'. Whereas if I replace the operator with an | the error is solved. I hope it helps, or please indicate me if I'm commiting the error. Thank you very much! Reproduction Linkhttps://zustand.docs.pmnd.rs/learn/guides/nextjs#initializing-the-store |
Replies: 1 comment 1 reply
|
fixed. thx |
fixed. thx