es-membrane

Home > ts-morph-structures > AddImportContext

AddImportContext interface

A description of the imports to add.

Signature:

export interface AddImportContext 

Properties

Property Modifiers Type Description
[importNames](/es-membrane/ts-morph-structures/api/ts-morph-structures.addimportcontext.importnames.html) readonly string\[\] The names to add to the import. Pass an empty array for "\*".
[isDefaultImport](/es-membrane/ts-morph-structures/api/ts-morph-structures.addimportcontext.isdefaultimport.html) boolean True if the import is the default. importNames will then be the default import.
[isPackageImport](/es-membrane/ts-morph-structures/api/ts-morph-structures.addimportcontext.ispackageimport.html) boolean True if `this.pathToImportedModule` represents a package import. False if the imported module path should be relative to the manager's absolute path in generated code.
[isTypeOnly](/es-membrane/ts-morph-structures/api/ts-morph-structures.addimportcontext.istypeonly.html) boolean True if the import names are types only.
[pathToImportedModule](/es-membrane/ts-morph-structures/api/ts-morph-structures.addimportcontext.pathtoimportedmodule.html) string This could be an absolute path, or a package import like "ts-morph-structures".