我收到打字稿错误“ HTMLElement类型上不存在属性”

我是Typescript的新手,我试图在Typescript中创建状态机。 我不确定我的语法是否正确,但是却出现此错误: 类型“ HTMLElement”上不存在“属性”商店

类测试{

private $componentSelector: JQuery;
private $radioButtons: JQuery;
private store: Object;

constructor($theComponentSelector: JQuery) {
    this.$componentSelector = $theComponentSelector;
    this.$radioButtons = this.$componentSelector.find('.radio-button');
    this.store = {
        selectionType: ''
    }
    this.test();
}

test() {
    this.$radioButtons.on('click',function(){
      this.store.selctionType = $(this).val();  
    });
}

}

a53932991 回答:我收到打字稿错误“ HTMLElement类型上不存在属性”

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3116762.html

大家都在问