@snail-js/api
Version:
Http Request with Decorators Api, build on axios
17 lines (16 loc) • 588 B
TypeScript
import "reflect-metadata";
import { VersioningOption } from "../typings";
export declare const VERSIONING_KEY: unique symbol;
export declare const VERSION_KEY: unique symbol;
/**
* 版本管理装饰器,为请求设置全局版本管理器
* @param options 版本管理选项
* @returns
*/
export declare const Versioning: (options: VersioningOption) => (target: any) => void;
/**
* 为方法设置版本
* @param version 字符型,临时设置被装饰的请求版本
* @returns
*/
export declare const Version: (version: string) => (target: any, propertyKey: string) => void;