We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I would like to create standard Reducer like this :
import { ImmerReducer } from "immer-reducer"; interface HttpListResult<T> { query: HttpListQuery; total?: number; data?: T[]; } interface ListViewState<T> extends HttpListResult<T> { isLoading?: boolean; } export abstract class MyReducerBase<T> extends ImmerReducer<ListViewState<T>> { getAll(query: HttpListQuery) { this.draftState = { query, isLoading: true, }; } getAllResult(result: HttpListResult<T>) { this.draftState = { ...result, isLoading: false, }; } }
But in the draftState, data property is typed in Draft<T>...
What is my error ?
The text was updated successfully, but these errors were encountered:
With typescript 3.8 I see no type errors with your code, but I don't know what your type definition is for HttpListQuery.
Sorry, something went wrong.
No branches or pull requests
Hello, I would like to create standard Reducer like this :
But in the draftState, data property is typed in Draft<T>...
What is my error ?
The text was updated successfully, but these errors were encountered: