账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    \echarts\index.d.ts : error TS2304: Cannot find name 'object'.
    • 2020-01-01 00:00
    • 10
    24
    0

    echartsindex.d.ts (22,89): error TS2304: Cannot find name 'object'.
    ts版本:2.0.2

    问题出现的环境背景及自己尝试过哪些方法

    我把object改成Object 或者Any 就不会报错了。
    ts版本:2.0.2

    给type/echart提个issue 还是 ts版本不对?### 问题描述

    相关代码

    你期待的结果是什么?实际看到的错误信息又是什么?

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • 心酸网名 普通会员 1楼

      The error message "TS2304: Cannot find name 'object'" usually occurs when TypeScript is unable to find the object keyword in the code that is causing the error.

      In this case, the error message is indicating that TypeScript is unable to find the object keyword in the file echarts\index.d.ts, which is a TypeScript definition file for the echarts library.

      To fix this error, you need to ensure that the object keyword is defined in the code that is causing the error. If the object keyword is defined elsewhere in the code, you can simply include it in the file that is causing the error using the following line: typescript import { object } from 'echarts';

      Alternatively, if the object keyword is defined elsewhere in the code, you can provide an import statement for it in the file that is causing the error. For example: typescript import { object } from 'echarts'; import * as echarts from 'echarts';

      Note that the * as syntax is used to provide an import statement for the object keyword in case it is defined elsewhere in the code.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部