-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(40817): suggest import for default exported alias (#40845)
- Loading branch information
1 parent
a21003d
commit 5c55fc0
Showing
3 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @Filename: /foo.ts | ||
////const a = () => {}; | ||
////export default a; | ||
|
||
// @Filename: /test.ts | ||
////[|foo|]; | ||
|
||
goTo.file("/test.ts"); | ||
verify.importFixAtPosition([`import foo from "./foo"; | ||
foo`]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @moduleResolution: node | ||
|
||
// @Filename: /node_modules/hooks/useFoo.ts | ||
////declare const _default: () => void; | ||
////export default _default; | ||
|
||
// @Filename: /test.ts | ||
////[|useFoo|]; | ||
|
||
goTo.file("/test.ts"); | ||
verify.importFixAtPosition([`import useFoo from "hooks/useFoo"; | ||
useFoo`]); |