I recently encountered an issue when trying to import a pure JavaScript library into a TypeScript project, resulting in the error message:
Could not find a declaration file for module xxx
.
After some research, I learned that this error can be suppressed using the comment @ts-ignore
. However, when I added this comment before the line causing the first error, I received another error:
Do not use "// @ts-ignore" comments because they suppress compilation errors @typescript-eslint/ban-ts-ignore
Can anyone advise on how to resolve this error while still suppressing the original message?