diff --git a/test/component.test.ts b/test/component.test.ts index 2782d0d..70da79c 100644 --- a/test/component.test.ts +++ b/test/component.test.ts @@ -120,6 +120,17 @@ Component({ }, }) +expectError( + Component({ + custom: 1, + methods: { + f() { + this.custom + }, + }, + }), +) + interface Config { a: number } diff --git a/test/issue.test.ts b/test/issue.test.ts index 08d6bf8..7dfda3f 100644 --- a/test/issue.test.ts +++ b/test/issue.test.ts @@ -470,7 +470,6 @@ import WX = WechatMiniprogram } Component({ - _timer: '', properties: { bar: { type: Object, @@ -490,7 +489,6 @@ import WX = WechatMiniprogram expectType(this.data.bar) expectType(this.properties.bar) expectType(this.getData()) - expectType(this._timer) }, } }) diff --git a/types/wx/lib.wx.component.d.ts b/types/wx/lib.wx.component.d.ts index 10f7fb1..28638d4 100644 --- a/types/wx/lib.wx.component.d.ts +++ b/types/wx/lib.wx.component.d.ts @@ -64,8 +64,6 @@ declare namespace WechatMiniprogram.Component { Partial> & Partial & Partial & - // 有很大几率会在 this.xxx 上使用一些暂存的变量,应该像Page一样支持传入自定义属性 - Partial & ThisType< Instance< TData,