Closed JKRhb closed 2 years ago
I think something is off, @type/x
is meant to be used as devDependecies
and everything should work correctly. Because in practice you distribute only the js file and the d.ts types.
Hmm, I think at least bl
is an exception to the rule as OutgoingMessage
extends/implements BufferList
from bl
. Therefore, the ts transpiler needs the type information to work. As the types are included as a devDependency here, node-wot can't access the types, though. That is the reason the ts transpiler is complaining, I think.
Totals | |
---|---|
Change from base Build 1995369947: | 0.0% |
Covered Lines: | 1142 |
Relevant Lines: | 1258 |
so we sta with types for bl AND lru-cache in deps?
Hmm, yeah, there was also an error thrown for lru-cache. I just noticed that here we have a similar case, as the CoapLRUCache
extends LRUCache
. So I think both have to go into the regular dependencies.
We could try removing @types/node
by the way, not sure if anything directly depends on a definition from the module, though.
I now removed @types/node
from the regular dependencies. Transpiling in dependent projects should still work (tested out using npm install --production
).
@Apollon77 Could you release a new version after merging this PR? :)
DO you want to add the version increases to the PR already? ;-)
DO you want to add the version increases to the PR already? ;-)
Sure, done :)
Is there any blocking issue left?
@danielpeintner just me having time to merge and release it together with an other fix ...
This PR fixes a typescript related issue raised in https://github.com/eclipse/thingweb.node-wot/issues/728 where the types for the
bl
andlru-cache
modules could not be found during transpilation.