Open unarist opened 1 year ago
Thanks for the report!
I'm aware there has been come imperfections with those classes. One case I remember in particular is that deep in that complicated hierarchy there is a Duplex
class which extends what ST needs to consider two classes. This is not permitted, so one of them is dropped.
This may be something different though, I'll look into eventually. For now the cast is a good workaround
In below code,
stream.end()
should be compiled asfs.WriteStream
extendsstream.Writable
which hasend()
method. However, this won't be compiled withoutasInstanceOf[]
.ST generated source:
The corresponding d.ts should be this. I'm not sure why ScalablyTyped cannot resolve this
extends
, but maybeimport * as stream from 'node:stream'
is the case.https://github.com/DefinitelyTyped/DefinitelyTyped/blob/61694a446616874377bc7b87b8644d8eed2da19a/types/node/v18/fs.d.ts#L450 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/61694a446616874377bc7b87b8644d8eed2da19a/types/node/v18/fs.d.ts#L22 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/61694a446616874377bc7b87b8644d8eed2da19a/types/node/v18/stream.d.ts#L1455-L1457
build configuration
plugins.sbt
build.sbt