"Implicite any" and "Cannot use namespace 'LRUCache' as a type" typescript compilation error when using the library in the context of a yarn workspace #24
When building the library in the context of a yarn workspace I'm getting the following errors, it has to be noted that the code still compile, but an error status is returned.
lib/io/ParallelFileWriter.ts:19:27 - error TS2709: Cannot use namespace 'LRUCache' as a type.
19 private readonly cache: LRUCache<string, IWriteEntry>;
~~~~~~~~
lib/io/ParallelFileWriter.ts:24:22 - error TS2351: This expression is not constructable.
Type 'typeof import("/home/id357/Documents/PhD/coding/Experiments-Solid-Link-Traversal/node_modules/lru-cache/dist/commonjs/index")' has no construct signatures.
24 this.cache = new LRUCache({
~~~~~~~~
lib/io/ParallelFileWriter.ts:26:17 - error TS7006: Parameter 'key' implicitly has an 'any' type.
26 dispose: (key, value) => this.closeWriteEntry(key, value),
~~~
lib/io/ParallelFileWriter.ts:26:22 - error TS7006: Parameter 'value' implicitly has an 'any' type.
26 dispose: (key, value) => this.closeWriteEntry(key, value),
~~~~~
lib/io/ParallelFileWriter.ts:76:12 - error TS7006: Parameter 'key' implicitly has an 'any' type.
76 .map(key => this.cache.get(key)!.fileStream)
~~~
lib/io/ParallelFileWriter.ts:77:12 - error TS7006: Parameter 'fileStream' implicitly has an 'any' type.
77 .map(fileStream => new Promise((resolve, reject) => {
~~~~~~~~~~
lib/io/ParallelFileWriter.ts:83:24 - error TS7006: Parameter 'writeEntry' implicitly has an 'any' type.
83 this.cache.forEach(writeEntry => writeEntry.writeStream.end());
I am not sure why inside the repository I am not getting those erros. I think updating LRUCache (with the associated changes implied) would solve the issue but I am not sure.
When building the library in the context of a yarn workspace I'm getting the following errors, it has to be noted that the code still compile, but an error status is returned.
I am not sure why inside the repository I am not getting those erros. I think updating
LRUCache
(with the associated changes implied) would solve the issue but I am not sure.