我想用 FetchingStatus 类型输入状态。如何实施?
type FetchingStatus = 'idle' | 'loading' | 'succeeded' | 'failed';
const initialState = companyPagesAdapter.getInitialState({
status: 'idle',
perPage: 1,
lastPage: 1
});
这是 getInitialState 的签名:
getInitialState<S extends object>(state: S): EntityState<T> & S