@snail-js/api
Version:
Http Request with Decorators Api, build on axios
11 lines (10 loc) • 406 B
TypeScript
import "reflect-metadata";
import { Strategy } from "../typings";
export declare const STRATEGY_KEY: unique symbol;
/**
* 策略装饰器,为请求添加请求策略或响应策略
* @param strategies @type Strategy[]
* - 传入的策略请使用new 实例化
* @returns
*/
export declare const UseStrategy: (...strategies: Array<new () => Strategy>) => (target: any, propertyKey?: string) => void;