auto-request
Version:
通过Yapi JSON Schema生成接口Axios或Taro接口
36 lines • 1.35 kB
TypeScript
export interface FunctionInfo {
name: string;
description?: string;
summary?: string;
}
/**
* 从 JavaScript 代码字符串中提取导出的函数名及其注释
* @param code - JavaScript 代码字符串
* @returns 包含函数名和注释的对象数组
*/
export declare const extractFunctionsFromCode: (code: string) => Array<FunctionInfo>;
/**
* 从文件中提取导出的函数名
* @param filePath - 文件路径
* @returns 导出的函数名数组
*/
export declare const extractFunctionsFromFile: (filePath: string) => FunctionInfo[];
/**
* 比较两个函数数组,输出新增和删除的函数
* @param oldFunctions - 旧的函数数组
* @param newFunctions - 新的函数数组
* @returns 包含新增和删除函数信息的对象
*/
export declare const compareFunctions: (oldFunctions: Array<FunctionInfo>, newFunctions: Array<FunctionInfo>) => {
added: typeof newFunctions;
removed: typeof oldFunctions;
};
/**
* 生成多列 Markdown 表格
* @param data - 表格数据(二维数组)
* @param headers - 表头数组
* @param title - 表格标题(可选)
* @returns Markdown 表格字符串
*/
export declare const generateMultiColumnMarkdownTable: (data: Array<Array<string | undefined>>, headers: string[], title?: string) => string;
//# sourceMappingURL=countFunctions.d.ts.map