Skip to content

jasonkuhrt-archive/scratch-vscode-ts-export-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TS + VSCode Import/Export

Cases

Import of default export

Result

As expected. The identifier nameused matches how the variable was defined in the source module. Example below makes this clear.

Example
default hint
default result

Import of generically named export

Result

Multiple auto-import hints. User can differentiate by going over each option and seeing the from differences. Does not import qualified. As a user, working with generic names intended to work by namespace, this is probable not what you want. Namespaced auto-import is an open issue on TS repo.

Example
generic autoimport hint2
generic autoimport hint1
generic autoimport result

What the user probably actually wanted. Namespaced auto-import is an open issue on TS repo

generic autoimport actually desired

Import of something that is both a named & default export

Result

VSCode presents two auto-complete hints. Selecting either produces same result: Import of the default export. Default export seems to shadow named one. Two hint given suggets VSCode is aware of the duality, but fumbles thereafter.

Slightly buggy. Presumably non-issue in near future. OK if named import is not common case.

Example
named and default 1
named and default 2
named and default result

Import of named export from module including default export

Result

As expected.

Example
import from named default module
import from named default module result

Other

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published