AsyncValue An ADT for representing an async value over time const asyncTodos: AsyncValue<Error, Todo[]> = notAsked async function loadTodos() { asyncTodos = pending try { const todos = await fetchTodos() asyncTodos = success(todos) } catch (reason) { asyncTodos = failure(reason) } }