Importing JS File into Typescript

前端 未结 2 1279

I\'m looking at moving over to Typescript and currently looking at doing this slowly if possible file by file.

Now the system I currently have is built with Webpack and

2条回答
  •  北海茫月
    2021-02-08 01:48

    What about simply rename foo.js to foo.ts (it may require some additional steps but often it works fine) and then rewrite your snippet to:

     /// 
    
     foo('something');
    

提交回复
热议问题