1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.WsParamsFactory = void 0;
|
4 | const ws_paramtype_enum_1 = require("../enums/ws-paramtype.enum");
|
5 | class WsParamsFactory {
|
6 | exchangeKeyForValue(type, data, args) {
|
7 | var _a;
|
8 | if (!args) {
|
9 | return null;
|
10 | }
|
11 | switch (type) {
|
12 | case ws_paramtype_enum_1.WsParamtype.SOCKET:
|
13 | return args[0];
|
14 | case ws_paramtype_enum_1.WsParamtype.PAYLOAD:
|
15 | return data ? (_a = args[1]) === null || _a === void 0 ? void 0 : _a[data] : args[1];
|
16 | default:
|
17 | return null;
|
18 | }
|
19 | }
|
20 | }
|
21 | exports.WsParamsFactory = WsParamsFactory;
|