In the Typescript project, I need to import some old js files that make module.exports inside myself.
How do I import:
import * as httpConnection from '...path...';
I got errors from the compiler:
Could not find a declaration file for module '...path...'. '...path...' implicitly has an 'any' type.
After that, it works fine, but I need to avoid this error in the console.
How can I make the compiler understand that import is of any type without creating a declaration file?
Thanks for the ideas in advance.
source
share