Javascript ';这';隐式具有类型';任何';
错误显示:Javascript ';这';隐式具有类型';任何';,javascript,typescript,prototype,Javascript,Typescript,Prototype,错误显示: interface ob { [key: string]: string } function DrawFillSVG(options: ob) { this.options = extend({}, this.options); extend(this.options, options); this._init(); } 但是我不清楚如何进行,任何帮助都会被请求函数此类型注释如下所示: TS2683: 'this' implicitly has type 'a
interface ob {
[key: string]: string
}
function DrawFillSVG(options: ob) {
this.options = extend({}, this.options);
extend(this.options, options);
this._init();
}
但是我不清楚如何进行,任何帮助都会被请求函数
此类型注释如下所示:
TS2683: 'this' implicitly has type 'any' because it does not have a type annotation
改用类DrawFillSVG
显示整个文件选项是什么??
function DrawFillSVG(this: whateverType, options: ob) {
this.options = extend({}, this.options);
extend(this.options, options);
this._init();