Open silasdavis opened 3 days ago
A hack that appears to work here:
Merge into tsconfig.json
{
"compilerOptions": {
"typeRoots": ["./node_modules/@types", "**/node_modules/@types", "./@types"]
}
}
Add to root of repo: @types/fhevmjs/index.d.ts
:
export * from "fhevmjs/web";
A fix on fhevmjs is preferable.
Once you add the above incidentally you can see lots of type mismatches in ./test/instance.ts
and associated mocks
Made a start in #583
Description
Currently there are a huge number of Typescript errors emitted by:
Expected Behavior
There should be no Typescript compiler errors
Screenshots / Logs
Environment Information
Fill in the relevant environment details where the issue was observed:
v20.17.0
fhEVMjs
Version:0.6.0-3
pnpm
5.5.2
Steps Taken to Debug
Most of these errors would be straight-forward to address by making better use of:
Happy to follow-up with some fixes for these.
Trickier to resolve is:
I'm not entirely clear why these types are not resolved but it should be possible for
fhevmjs
to provide them in a manner consumable by NodeNext/Bundler configurations and Node16. Upgrading module/moduleResolution is not practical because it will pull in many more incompatibilities (e.g. with hardhat)