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
web3-types/src/eth_types.ts:17:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'
Steps to reproduce the behavior
add the following compiler options to a typescript project:
Install web3 as a dependency and attempt to compile
Cause
Inclusion of src directory in all package is the main culprit. Even with skipLibCheck this error pops up due to compiler building every .ts file.
With the new typescript 5.5 this option will be removed, hence its not a major issue but basically indicates an unused import. Other than fixing the source the issue, I wondered if there's a reason for including src or it can be removed from the final artifact. This would also avoid recompilation by client applications
The text was updated successfully, but these errors were encountered:
Hi @arijoon ,
The fix is now published to npm 4.2.3-dev.0dec262.0 with @dev tag. So, You can download it with npm i web3@4.2.3-dev.0dec262.0 or npm i web3@dev. And it will be available with the next release (version > 4.2.2).
However, for your question about the src folder. In general, authors (like us) might publish the source code in the package in order to want to allow users to see the original TypeScript source code, for example, for debugging purposes or if they wish to transpile the code themselves with different settings.
I will close this issue as resolved. However, if you installed the last web3@dev version but you continue to face it, please open the issue again. And possibly provide a full simple project example to reproduce this issue on our machines. Or provide the code at some cloud IDE like https://codesandbox.io/.
Expected behavior
Successful typescript compilation
Actual behavior
Steps to reproduce the behavior
add the following compiler options to a typescript project:
Install
web3
as a dependency and attempt to compileCause
Inclusion of src directory in all package is the main culprit. Even with
skipLibCheck
this error pops up due to compiler building every.ts
file.With the new typescript 5.5 this option will be removed, hence its not a major issue but basically indicates an unused import. Other than fixing the source the issue, I wondered if there's a reason for including
src
or it can be removed from the final artifact. This would also avoid recompilation by client applicationsThe text was updated successfully, but these errors were encountered: