mike-marcacci / fs-capacitor

Filesystem-bufferred, passthrough stream that buffers indefinitely rather than propagate backpressure from downstream consumers.
MIT License
36 stars 8 forks source link

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

Closed j-gibweb closed 5 years ago

j-gibweb commented 5 years ago

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 commented 5 years ago

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

j-gibweb commented 5 years ago

@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/node@7.10.7"- is this expected?

mike-marcacci commented 5 years ago

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 commented 5 years ago

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