查看“︁JavaScript/typescript/error”︁的源代码
来自康健生活
←
JavaScript/typescript/error
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 标题文字 == * Property 'call' does not exist on type 'object' *: 在项目中,我使用了 <syntaxhighlight lang="typescript" inline> await this.axios.call(this.context, {</syntaxhighlight> 抛出此错误,axios 的设定是 *: <syntaxhighlight lang="typescript"> interface HttpInterface { axios: object; context?: Record<string, unknown>; }</syntaxhighlight> *: 如果改成 <code>axios: any</code> 可消除错误,又或者这样设置 *: <syntaxhighlight lang="typescript"> interface AxiosPropertyCall { call: any } interface HttpInterface { axios: AxiosPropertyCall; context?: Record<string, unknown>; } await this.axios.call(this.context</syntaxhighlight>
返回
JavaScript/typescript/error
。
导航菜单
康健生活
搜索
user-page
通知
user-interface-preferences
个人工具
登录
五一
多读书,多运动,多到远处走走,再看看不一样的世界。