Store fetching: fix the return record to include the error and fetching status.

master
Tom Hacohen 7 years ago
parent d3ad5b7080
commit 2f96977646

@ -29,6 +29,8 @@ type FetchType<T> = FetchTypeInterface<T>;
function fetchTypeRecord<T>() { function fetchTypeRecord<T>() {
return Record<FetchTypeInterface<T>>({ return Record<FetchTypeInterface<T>>({
value: null as T | null, value: null as T | null,
error: undefined,
fetching: undefined,
}); });
} }

Loading…
Cancel
Save