Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot extend an interface 'FSWriteStream'. Did you mean 'implements'? #13

Closed
j-gibweb opened this issue Oct 24, 2019 · 4 comments
Closed

Comments

@j-gibweb
Copy link

j-gibweb commented Oct 24, 2019

image

I'm not sure I understand why the classes are namespaced under tty instead of fs like you have in the module, its probably local to my machine? or not? idk, but ReadStream / WriteStream from fs are interfaces, hence the error

- import { ReadStream as FSReadStream, WriteStream as FSWriteStream } from "fs";
+ import { ReadStream as FSReadStream, WriteStream as FSWriteStream } from "tty";

Any insight would be great, thanks

This is from version 2.0.0

@mike-marcacci
Copy link
Owner

Hi @j-gibweb, this is quite odd... Are the type definitions coming from DefinitelyTyped? They definitely import the stream classes from fs.

@j-gibweb
Copy link
Author

@mike-marcacci the definitions are indeed coming from DefinitelyTyped

poking around a bit more I see the version of fs being referenced is from "@types/[email protected]"- is this expected?

@mike-marcacci
Copy link
Owner

Hmm, definitely not... the library definition specifies /// <reference types="node" /> so I'm curious if you have something else specifying that version of node in your typescript config?

@j-gibweb
Copy link
Author

This has mysteriously been resolved 😞 - Thanks for being so responsive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants