Import js file with TypeScript 2.0

后端 未结 2 785
栀梦
栀梦 2021-02-12 21:57

Abstract

I\'m trying to import \".js\" file from an external location (i.e. node_modules) I\'m trying to do this using commonjs module pattern, howeve

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-12 22:07

    being able to define it's ".d.ts" declarations while having both files located in different locations.

    import follows the same module resolution process when given a .js or .d.ts file with relative files.

提交回复
热议问题