You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that I couldn't compile a TypeScript project which depended on sketch-js, because it couldn't find interfaces exported by the proto:
node_modules/@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.d.ts:2:10 - error TS2305: Module '"../proto/compiled"' has no exported member 'IndexMapping'.
Looking in the node_modules of my project, I noticed that @datadog/sketches-js/dist/ddsketch/proto/compiled.d.ts contained only the lines:
I noticed that I couldn't compile a TypeScript project which depended on sketch-js, because it couldn't find interfaces exported by the proto:
Looking in the node_modules of my project, I noticed that
@datadog/sketches-js/dist/ddsketch/proto/compiled.d.ts
contained only the lines:...instead of the rich types you provide in that file in this git repo.
This looks similar to an issue in another project, which I found when googling the error message I was seeing:
https://github.com/cryptowatch/cw-sdk-node/issues/31
The problem is that tsc, when generating declarations, overrides the existing
compiled.d.ts
file in its zeal to declare types forcompiled.js
.When I simply paste the real file into my node_modules, I'm able to successfully build my dependent project.
I looked for ways to avoid generating declarations for only one file, but couldn't find an option like that in
tsc
.I believe this should be resolvable by appending a copy to the
build
script inpackage.json
:The text was updated successfully, but these errors were encountered: