使用 ts 进行开发时,computed 推荐使用 ComponentWithComputed 替代 微信的 Component 方法构造页面,然而 mobx-miniprogram 推荐 使用 ComponentWithStore 进行构造页面,那么请问如何才能使两者共存?
Activity
TtTRz commentedon Jul 27, 2022
对这块的 TS 支持确实有所欠缺,后续会完善下。
ginlink commentedon Jan 31, 2023
目前没有找到好方法,我选择放弃store的类型声明,因为一般情况下,computed用得会更多
copofe commentedon Feb 28, 2023
可以组合两个的类型声明,重写个
Tommykkkk commentedon Jan 9, 2025
你好,使用 ts 进行开发时,computed 推荐使用 ComponentWithComputed 替代 微信的 Component 方法构造页面 ,ts会发生报错问题 比如使用本身this.properties.A 的传递进来的参数ts提示 类型“{ onSelect(event: CustomEvent): void; onAdd(event: CustomEvent): void; beforExportData(arr: Comp[], CompCode: string): void; }”上不存在属性“properties”。这块内容应该如何去调整
LastLeaf commentedon Jan 9, 2025
请确认:
noImplicitThis
选项已经被打开;