TypeScript: Property does not exist on type '{}'

后端 未结 7 1793
忘掉有多难
忘掉有多难 2021-01-31 13:25

I am using Visual Studio 2013 fully patched. I am trying to use JQuery, JQueryUI and JSRender. I am also trying to use TypeScript. In the ts file I\'m getting an error as follo

7条回答
  •  梦如初夏
    2021-01-31 13:44

    You can assign the any type to the object:

    let bar: any = {};
    bar.foo = "foobar"; 
    

提交回复
热议问题