UNPKG

express-generator-typescript

Version:

Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead

16 lines (12 loc) 472 B
import { Response } from 'supertest'; /****************************************************************************** Types ******************************************************************************/ // Use generics to add properties to 'body' export interface TestRes<T = object> extends Omit<Response, 'body'> { body: T & { error?: string | ErrorObject }; } interface ErrorObject { message: string; [key: string]: unknown; }