DEV Community

Discussion on: Using TypeScript Project References to share common code

Collapse
 
uppajung profile image
Stuart Schechter •

Adding type after import can prevent the compiler from thinking that it needs to include an IData.js file or modules that try to grab IData.js.

In other words, I'd suggest changing the last code line to

import type IData from '../common/interfaces/IData'
Enter fullscreen mode Exit fullscreen mode

That would have saved me a few hours on my electron project.

Collapse
 
jameswallis profile image
James Wallis •

Interesting! Thanks for adding this. I'll add a link to your comment in the post.

Some comments have been hidden by the post's author - find out more