Home > ts-morph-structures > AddImportContext
A description of the imports to add.
Signature:
export interface AddImportContext
| Property | Modifiers | Type | Description |
|---|---|---|---|
| importNames | readonly string[] | The names to add to the import. Pass an empty array for “*”. | |
| isDefaultImport | boolean | True if the import is the default. importNames will then be the default import. | |
| isPackageImport | 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 | boolean | True if the import names are types only. | |
| pathToImportedModule | string | This could be an absolute path, or a package import like “ts-morph-structures”. |