Renaming exported interface leads to invalid name of import type in same file
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Renaming an exported interface leads to a invalid import type reference when the import type is in the same file as the interface
Version: 13.0.2
**To Reproduce**
```
project.createSourceFile('.', 'export interface Tom {}\n' +
'const a: import(\'C:/Users/liamh/PrivateProgramming/ts-morph-testing/morph/morph\').Tom = {};')
sourceFile.getDescendantsOfKind(SyntaxKind.InterfaceDeclaration).forEach(i => i.rename('Mike'));
````
Expected Result:
```
export interface Mike {}
const a: import('C:/Users/liamh/PrivateProgramming/ts-morph-testing/morph/morph').Mike= {};
```
Received Result:
```
export interface Mike {}
const a: import('C:/Users/liamh/PrivateProgramming/ts-morph-testing/morph/morph').MikeTomMike = {};
```
Contributor guide
Assessment
This issue has not been assessed yet.