type AsyncStateState = { version: number; loading: boolean; value: T | I; time: number; error: Error | null; }; type AsyncStateOptions = { initialValue: T | I; callWithTruthyDeps: boolean; }; type AsyncStateResultState = { version: number; time: number; error: Error | null; loading: boolean; loaded: boolean; reload: () => void; set: (value: ((current: T | I) => T) | T) => void; }; type AsyncStateResult = readonly [ T | I, AsyncStateResultState ]; export { AsyncStateState, AsyncStateOptions, AsyncStateResult, AsyncStateResultState, };