store: use return type over a type cast
This commit is contained in:
parent
2878f87879
commit
c0b38d4762
@ -90,8 +90,7 @@ export type State = {
|
||||
searchEnabled: boolean;
|
||||
};
|
||||
|
||||
const state = () =>
|
||||
({
|
||||
const state = (): State => ({
|
||||
appLoaded: false,
|
||||
activeChannel: undefined,
|
||||
currentUserVisibleError: null,
|
||||
@ -114,7 +113,7 @@ const state = () =>
|
||||
messageSearchResults: null,
|
||||
messageSearchPendingQuery: null,
|
||||
searchEnabled: false,
|
||||
} as State);
|
||||
});
|
||||
|
||||
type Getters = {
|
||||
findChannelOnCurrentNetwork: (state: State) => (name: string) => ClientChan | undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user