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) 484 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const constants_ts_1 = require("./constants.js"); const Init = (target, propertyKey, parameterIndex) => { const initOptions = Reflect.getMetadata(constants_ts_1.ClientConstants.InitOptions, target, propertyKey) ?? new Set(); initOptions.add(parameterIndex); Reflect.defineMetadata(constants_ts_1.ClientConstants.InitOptions, initOptions, target, propertyKey); }; exports.default = Init;