retrofit-axios-ts
Version:
A declarative and axios based retrofit implementation for JavaScript and TypeScript.
18 lines (17 loc) • 492 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BasePath = void 0;
const ensureMeta_1 = require("./helpers/ensureMeta");
/**
* Set base path for API service.
* @param path
* @sample @BasePath("/api/v1")
* @constructor
*/
const BasePath = (path) => {
return (target) => {
(0, ensureMeta_1.ensureMeta)(target.prototype, "basePath");
target.prototype.__meta__.basePath = path;
};
};
exports.BasePath = BasePath;