global type imports stripped from generated type declarations

Viewed 29

I am generating declarations for a library I am working on, and one file, I import a type from a third party library that is declared in node modules like this

//node_modules
declare module 'thirdpartylib' {
    global {
      interface MyInterface {
         ....

//my code
import { MyInterface } from 'thirdpartylib'
....

the import from thirdpartylib ends up being stripped out of my generated declaration files because it's global, so in the file it is just being referenced without an import.

Is there a way to keep these global types from being stripped from the generated declaration files?

0 Answers
Related