The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/lib/asyncState/AsyncState.ts

10 lines
500 B

import { AsyncStatePhase } from './AsyncStatePhase';
export type AsyncState<T> = (
{ phase: AsyncStatePhase.LOADING; value: undefined; error: undefined } |
{ phase: AsyncStatePhase.LOADING; value: T; error: undefined } |
{ phase: AsyncStatePhase.LOADING; value: undefined; error: Error } |
{ phase: AsyncStatePhase.RESOLVED; value: T; error: undefined } |
{ phase: AsyncStatePhase.UPDATING; value: T; error: undefined } |
{ phase: AsyncStatePhase.REJECTED; value: undefined; error: Error }
);