UNPKG

@tsed/platform-express

Version:
15 lines (14 loc) 441 B
import { isNumber } from "@tsed/core"; import { PlatformResponse } from "@tsed/platform-http"; export class PlatformExpressResponse extends PlatformResponse { end(data) { if (isNumber(data)) { // TODO remove this when Express 5 will be the default version of Ts.ED // @ts-ignore this.raw.send(this.statusCode, data); } else { this.raw.send(data); } } }