Lodin
Lodin

Reputation: 2068

Implementing typescript interface in webstorm gets "not implemented method" errors

I have an interface (Worker, actually) implemented for some classes. But WebStorm gets me a bunch of errors looking like this:

Typescript interface implementing errors in WebStorm

Why does it happen? I do not have this methods and properties in my interface. And it is compiled by npm tsc without any problem. Is it a bug?

Info:

Upvotes: 0

Views: 460

Answers (2)

Jonatin
Jonatin

Reputation: 112

It seems like Worker is used for HTML5 Web Workers. That is why you get errors that hint you to implement all the Worker interface methods.

You can try renaming your interface

Upvotes: 1

Kutyel
Kutyel

Reputation: 9084

Try renaming your interface, it seems that Worker could be some other kind of already-defined interface (maybe a super class of WebWorker)?

Upvotes: 1

Related Questions