UNPKG

retrofit-axios-ts

Version:

A declarative and axios based retrofit implementation for JavaScript and TypeScript.

18 lines (17 loc) 527 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FieldMap = void 0; const ensureMeta_1 = require("../helpers/ensureMeta"); /** * Set field map for API endpoint. * @param target * @param methodName * @param paramIndex * @sample @FieldMap post: Post * @constructor */ const FieldMap = (target, methodName, paramIndex) => { (0, ensureMeta_1.ensureMeta)(target, methodName); target.__meta__[methodName].fieldMapIndex = paramIndex; }; exports.FieldMap = FieldMap;