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.

9 lines (8 loc) 393 B
import { ClientConstants } from "./constants.js"; const IgnoreParam = (target, propertyKey, parameterIndex) => { const ignoreParams = Reflect.getMetadata(ClientConstants.IgnoreParams, target, propertyKey) ?? new Set(); ignoreParams.add(parameterIndex); Reflect.defineMetadata(ClientConstants.IgnoreParams, ignoreParams, target, propertyKey); }; export default IgnoreParam;