类型"{}"上不存在属性“更新" [英] property 'update' does not exist on type '{}'

查看:99
本文介绍了类型"{}"上不存在属性“更新"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进入了需要Gauge图表的入门AngularCli项目.为此,我使用了 https://stackblitz.com/edit/angular-tjk9sl?file = app%2Fapp.component.ts

I'm into a starter AngularCli project which require Gauge chart. For this I've used the code from https://stackblitz.com/edit/angular-tjk9sl?file=app%2Fapp.component.ts

ng服务--open 上,它在终端中显示错误为

On ng serve --open, it shows error in the terminal as

src/app/gauge/gauge.component.ts(100,21)中的

ERROR:错误TS2339:属性'configure'在类型'{}'上不存在.src/app/gauge/gauge.component.ts(109,21):错误TS2339:属性类型"{}"上不存在"isRendered".src/app/gauge/gauge.component.ts(161,21):错误TS2339:属性'render'在类型'{}'上不存在.src/app/gauge/gauge.component.ts(173,21):错误TS2339:属性类型"{}"上不存在更新".src/app/gauge/gauge.component.ts(188,16):错误TS2339:属性'render'在类型'{}'上不存在.

ERROR in src/app/gauge/gauge.component.ts(100,21): error TS2339: Property 'configure' does not exist on type '{}'. src/app/gauge/gauge.component.ts(109,21): error TS2339: Property 'isRendered' does not exist on type '{}'. src/app/gauge/gauge.component.ts(161,21): error TS2339: Property 'render' does not exist on type '{}'. src/app/gauge/gauge.component.ts(173,21): error TS2339: Property 'update' does not exist on type '{}'. src/app/gauge/gauge.component.ts(188,16): error TS2339: Property 'render' does not exist on type '{}'.

和浏览器输出类似,

无法获取/

请帮助我解决此问题.预先感谢.

Please help me to solve this. Thanks in advance.

推荐答案

gaugemap 的类型现在为 {} ,如您所见.将 gaugemap 的类型设置为 any 以传递编译器

The type of gaugemap is now {} and as you see it has nothing in it. Set the type for gaugemap to any for passing compiler

gaugemap: any = {}

这篇关于类型"{}"上不存在属性“更新"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆