Closed jvilk closed 9 years ago
It should certainly be telling you the offending member.
Offhandedly, it seems like you're missing diskSpace
, you may have misspelled supportsSync
as supportsSynch
in file_system
(or vice versa).
A couple of the *Sync
methods are missing, for which you'll need to implement in WorkerFS
and throw an exception in them, or make them optional in the FileSystem
interface.
There might be more (or I might be wrong entirely) but that's it at a glance. If this fixes your problem, don't close the issue.
Related to #933 perhaps?
Here's an example of a way to reproduce the issue (might not be the same as the linked repo, but illustrates the point):
interface FileSystem {
read: number;
}
function fn(s: WorkerFS): void;
function fn(s: FileSystem): void;
function fn(s: FileSystem|WorkerFS) { }
class WorkerFS implements FileSystem {
read: string;
}
This emits only the following error (with no details):
a.ts(10,7): error TS2420: Class 'WorkerFS' incorrectly implements interface 'FileSystem'.
Wow, didn't take long for all of you to look into this! Awesome.
...you may have misspelled supportsSync as supportsSynch in file_system (or vice versa).
Yup, that was the only thing I was missing. The diskSpace
and *Sync
methods have default implementations in the BaseFileSystem
class that I am extending. (It's supportsSynch
to disambiguate between synchronous file system operations and the sync method.)
Hopefully I won't encounter this bug again until it's fixed, since it's rather frustrating to have an unactionable error when you have a lot of methods in an interface. Best of luck with the fix!
I'm still having this problem, even though it's marked as fixed.
Please see Gist: https://gist.github.com/hessryanm/177b0cada8c51516371e
Error is: models/Card.ts(13,14): error TS2420: Class 'Card' incorrectly implements interface 'ICard'.
@hessryanm filed #5757 to track this issue.
I'm getting the following compiler error using TypeScript 1.4.1:
Unfortunately, TypeScript does not tell me what property or method is incorrectly implemented/specified, if any. Is this a bug in the compiler?
The relevant code can be checked out of the
webworker
branch of my BrowserFS repository.Compiler command:
If that's too much code to work through, I can see if I can work it into a smaller test case...
Thanks in advance!