Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
Describe the bug
Most of the time when I use the auto-import in vscode the import is a total mess and does not represent the actual path. This on a newly started project with NS 6.0 and using long import paths.
To Reproduce
Observable is imported from tns-core-modules/ui/page/page.tns-core-modules/data/observableObservableArray is imported from tns-core-modules/data/observable-array/observable-array.tns-core-modules/data/observable-arrayView is imported from tns-core-modules/ui/page/pagetns-core-modules/ui/core/viewGridLayout isn't even recognized for auto importExpected behavior
Objects to be auto-imported from their correct locations instead of their aliased/exported paths.
Sample project
Additional context
May be something that can be fixed together with moving to scoped packages (#4041 )
This is a real pain-point for me as a developer, and makes React Native far more ergonomic to work with. In React NativeScript, I re-export many key modules from one file (just like #4041) to improve Intellisense, but it would be great if the NativeScript team could do the suggested refactor from #4041 to improve the developer experience for everyone.
One issue that causes this is that a lot of the submodules in tns-core-modules actually re-export items when they shouldn't.
For instance, Observable is re-exported in tns-core-modules/ui/page/page when it really should only be imported by that module and only exported by tns-core-modules/data/observable.
Most helpful comment
One issue that causes this is that a lot of the submodules in
tns-core-modulesactually re-export items when they shouldn't.For instance,
Observableis re-exported intns-core-modules/ui/page/pagewhen it really should only be imported by that module and only exported bytns-core-modules/data/observable.