1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | /**
|
4 | *
|
5 | * This class simply wrap the original Response class in order to add async/await
|
6 | * functionality, improving code readability and maintenability.
|
7 | */
|
8 | var AsyncResponse = /** @class */ (function () {
|
9 | function AsyncResponse() {
|
10 | }
|
11 | AsyncResponse.prototype.performResponse = function (req, res) {
|
12 | this.asyncResponse(req, res)
|
13 | .then(function () { })
|
14 | .catch(function (err) {
|
15 | throw err;
|
16 | });
|
17 | };
|
18 | return AsyncResponse;
|
19 | }());
|
20 | exports.default = AsyncResponse;
|