UNPKG

@bytekit/autofetch

Version:

A TypeScript-first, decorator-based HTTP client for building elegant and modular API clients with fetch under the hood. Inspired by Spring's `@RestClient` and OpenFeign.

11 lines (10 loc) 489 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const constants_ts_1 = require("./constants.js"); const BodyParam = (target, propertyKey, parameterIndex) => { const bodyParams = Reflect.getMetadata(constants_ts_1.ClientConstants.BodyParams, target, propertyKey) ?? new Set(); bodyParams.add(parameterIndex); Reflect.defineMetadata(constants_ts_1.ClientConstants.BodyParams, bodyParams, target, propertyKey); }; exports.default = BodyParam;