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) 505 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const constants_ts_1 = require("./constants.js"); const FormParam = (name) => (target, propertyKey, parameterIndex) => { const formParams = Reflect.getMetadata(constants_ts_1.ClientConstants.FormParams, target, propertyKey) ?? new Map(); formParams.set(parameterIndex, name); Reflect.defineMetadata(constants_ts_1.ClientConstants.FormParams, formParams, target, propertyKey); }; exports.default = FormParam;