UNPKG

rapplus

Version:
42 lines (41 loc) 1 kB
import type { IOptions } from './../mergeOptions'; interface IFileInfo { fileName: string; filePath: string; moduleId: number; content: string; } export declare type ITypeName = { resTypeName: string; reqTypeName: string; reqUrl: string; reqMethod: string; interfaceId: number; } | null; export interface IFuncInfo { funcName: string; body: string; comment: string; funcType: 'CallExpression' | 'FunctionDeclaration' | 'ArrowFunction'; } export declare function requestFileParse(file: { path: string; content: string; }, formatFunc: (params: IFuncInfo) => ITypeName, config: IOptions): { importType: { importNames: any[]; importPath: string; }; funcTypes: { body: string; funcName: string; comment: string; resTypeName: string; reqTypeName: string; reqUrl: string; reqMethod: string; interfaceId: number; }[]; fileInfo: IFileInfo; }; export {};