@tsed/platform-express
Version:
A TypeScript Framework on top of Express
15 lines (14 loc) • 441 B
JavaScript
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);
}
}
}