UNPKG

counterfact

Version:

Generate a TypeScript-based mock server from an OpenAPI spec in seconds — with stateful routes, hot reload, and REPL support.

7 lines (6 loc) 230 B
/** * A value that is either `T` directly or a `Promise<T>`. * Route handlers may return either synchronous values or promises, and * Counterfact will await them transparently. */ export type MaybePromise<T> = T | Promise<T>;