You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of this I have to create custom error with manual adjusting of the prototype. For example
class FooError extends Error {
constructor(m: string) {
super(m);
// Set the prototype explicitly.
Object.setPrototypeOf(this, FooError.prototype);// LINE X
}
sayHello() {
return "hello " + this.message;
}
}
The problem is that plugin (3.0.1 (NetBeans 9.0)) shows me Property 'setPrototypeOf' does not exist on type 'ObjectConstructor'.... at LINE X. I changed code to (<any>Object).setPrototypeOf(this, FooErrorError.prototype) as described here but setPrototypeOf is red color anyway. At the same time I can compile without any problems both variants.
P.S. Thanks a lot for nice plugin!!!
The text was updated successfully, but these errors were encountered:
Because of this I have to create custom error with manual adjusting of the prototype. For example
The problem is that plugin (3.0.1 (NetBeans 9.0)) shows me
Property 'setPrototypeOf' does not exist on type 'ObjectConstructor'....
at LINE X. I changed code to(<any>Object).setPrototypeOf(this, FooErrorError.prototype)
as described here butsetPrototypeOf
is red color anyway. At the same time I can compile without any problems both variants.P.S. Thanks a lot for nice plugin!!!
The text was updated successfully, but these errors were encountered: