为IDEA配置frida智能提示出现的小问题

发布时间:2024-01-10 03:57:27

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成功!
在这里插入图片描述

文章来源:https://blog.csdn.net/qq_45085308/article/details/125593819
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。