Skip to content

Commit

Permalink
Allow imports with the same names as global types to be moved by refa…
Browse files Browse the repository at this point in the history
…ctoring
  • Loading branch information
Andarist authored and andrewbranch committed Nov 7, 2024
1 parent d0d3dc0 commit 4d1abee
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/cases/fourslash/moveToNewFile_importNameLikeGlobal1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/// <reference path='fourslash.ts' />

// @lib: dom

// @Filename: /a.ts
//// export default class Event {}

// @Filename: /b.ts
//// import Event from './a.js';
//// [|export function test(test: Event): void {}|]

verify.noErrors();

verify.moveToNewFile({
newFileContents: {
"/b.ts": "",

"/test.ts":
`import Event from './a';
export function test(test: Event): void { }
`,
},
});

0 comments on commit 4d1abee

Please sign in to comment.