Closed maximelkin closed 6 years ago
Thanks for the report. I'm aware and working on the issue (I mentioned it in #14) . Seems like the generated declaration file has unresolvable types stream
and Buffer
. I guess one hack to overcome this is to append:
declare namespace LZUTF8 {
type Buffer = any;
namespace stream {
type Transform = any;
}
}
to the generated d.ts
file during the build process. Another option is to maintain the file manually, but I prefer it to be automated. Please let me know if you know of better alternatives? (I wish there was a feature that does the cast to any
in the TS compiler but I couldn't find anything like this).
I went with this solution, for now, and pushed it to npm (version 0.5.3
).
node_modules/lzutf8/build/production/lzutf8.d.ts:18:43 - error TS2503: Cannot find namespace 'stream'.
18 static createCompressionStream(): stream.Transform;
node_modules/lzutf8/build/production/lzutf8.d.ts:280:41 - error TS2503: Cannot find namespace 'stream'.
280 function createCompressionStream(): stream.Transform;