#363 引入了一个类型推断的 Bug
Component({
properties: {
any: {
type: null,
value: '',
},
},
methods: {
test() {
this.data.any // 应该是 any,但是推断成了 nerver
},
}
})
暂时的 Workaround
Component({
properties: {
any: {
type: null,
value: '' as any,
},
},
methods: {
test() {
this.data.any // any
},
}
})
cc @LastLeaf