@tsed/common
Version:
A TypeScript Framework on top of Express
28 lines • 672 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapParamsOptions = void 0;
const core_1 = require("@tsed/core");
/**
* @ignore
*/
function mapParamsOptions(args) {
if (args.length === 1) {
if (typeof args[0] === "string") {
return {
expression: args[0]
};
}
if (!core_1.isObject(args[0])) {
return {
useType: args[0]
};
}
return args[0];
}
return {
expression: args[0],
useType: args[1]
};
}
exports.mapParamsOptions = mapParamsOptions;
//# sourceMappingURL=mapParamsOptions.js.map