create-plume-react-project
Version:
CLI to create Plume React Project
10 lines (8 loc) • 376 B
text/typescript
import { PromiseFunction } from 'simple-http-rest-client';
/**
* Any Promise-like (compatible with regular Promise) that provides then and catch method for errors.
*/
export type AnyPromise<T, E = unknown> = {
then: <R = void>(thenFunction: PromiseFunction<T, R>) => AnyPromise<R, E>,
catch: <R = void>(catchFunction: PromiseFunction<E, R>) => AnyPromise<R | T, E>,
};