ps:为IDEA配置frida智能提示教程:https://blog.csdn.net/freeking101/article/details/112634649
如题,最近在为IDEA配置frida智能提示的时候出现了一个小问题:
D:\git\frida-tsplugin>npm run compile
> frida-tsplugin@0.5.0 compile
> tsc -p .
src/index.ts:65:25 - error TS2554: Expected 7 arguments, but got 6.
65 return tsLS.getCompletionEntryDetails(fileName, position, name, options, source, pref);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/tsserverlibrary.d.ts:5887:227
5887 getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'data' was not provided.
Found 1 error in src/index.ts:65
这明显是传入参数不足,还差一个参数没有传入,于是我就去找index.ts的源码,根据这段错误提示:
node_modules/typescript/lib/tsserverlibrary.d.ts:5887:227
5887 getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined;
发现了,还差一个参数,可以用undefined来代替,于是将最后一个参数添加了上去,问题顺利解决。
上面这个D:\git
是我自己创建的文件夹
重新运行 npm run compile
成功!