美文网首页
Object literal must correspond t

Object literal must correspond t

作者: 冰点雨 | 来源:发表于2024-08-12 16:55 被阅读0次
     let param:object = {
          'key1':value1,
          'key2': value2
        }
    

    上面代码报错:
    Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)

    修改后:

        let param:object = Object({
        'key1':value1,
          'key2': value2
        })
    

    相关文章

      网友评论

          本文标题:Object literal must correspond t

          本文链接:https://www.haomeiwen.com/subject/qrwtkjtx.html