rapplus
Version:
rapper, use http api as a function
46 lines (45 loc) • 1.32 kB
TypeScript
import type { IFuncInfo, ITypeName } from './requestFileParse';
interface IConfig {
download: {
requestFunc?: (params: {
funcDescription: string;
repositoryId: number;
moduleId: number;
interfaceId: number;
requestUrl: string;
requestMethod: string;
rapUrl: string;
}) => {
reqTypeName: string;
resTypeName: string;
funcMain: string;
};
requestModule?: (params: {
repositoryId: number;
moduleId: number;
moduleRapUrl: string;
moduleDescription: string;
}) => {
fileName: string;
moduleHeader: string;
};
moduleId?: number;
};
rapper: {
apiUrl?: string;
/** rap 前端地址,默认是 http://rap2.taobao.org */
rapUrl?: string;
matchDir?: string;
tokenCookie?: string;
repositoryId?: number;
};
upload: {
formatFunc?: (params: IFuncInfo) => ITypeName;
moduleId?: number;
alias?: Record<string, string>;
};
__completion?: boolean;
}
export declare type IOptions = Partial<IConfig>;
export default function defineConfig(options: IOptions): Partial<IConfig>;
export {};