Typescript: Ignore implicitly any type when importing js module

前端 未结 2 1464
旧时难觅i
旧时难觅i 2021-02-07 07:41

In Typescript project I need to import some old js files that do module.exports inside of themselves.

As i import:

import * as httpConnection from \'...p         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-07 08:44

    You could create a file named: global.d.ts in the root of your project and add this:

    declare module '*';
    

提交回复
热议问题