@methodus/server
Version:
dynamic rpc components
36 lines • 960 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class MethodResult {
constructor(result, total, page) {
this._on = {};
this.headers = {};
this.result = result;
if (total)
this.total = total;
if (page)
this.page = page;
}
pipe(streamToPipe) {
this.stream = streamToPipe;
return this.stream;
}
setHeader(key, value) {
this.headers[key] = value;
}
on(key, value) {
this._on[key] = value;
}
}
exports.MethodResult = MethodResult;
class MethodResultStatus {
constructor(result, statusCode, total, page) {
this.statusCode = statusCode;
this.result = result;
if (total)
this.total = total;
if (page)
this.page = page;
}
}
exports.MethodResultStatus = MethodResultStatus;
//# sourceMappingURL=methodResult.js.map