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/apps/meteor/client/lib/asyncState/AsyncState.ts

9 lines
504 B

import type { 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 };