You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
CLI: 6.0.3
Cross-platform modules: 6.0.0
Android Runtime: 6.0.0
iOS Runtime: 6.0.0
Plugin(s):
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.
Correct one is tns-core-modules/data/observable
ObservableArray is imported from tns-core-modules/data/observable-array/observable-array.
Correct one is tns-core-modules/data/observable-array
View is imported from tns-core-modules/ui/page/page
Correct one is tns-core-modules/ui/core/view
GridLayout isn't even recognized for auto import
Expected 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 )
The text was updated successfully, but these errors were encountered:
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.
Uh oh!
There was an error while loading. Please reload this page.
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.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 fromtns-core-modules/ui/page/page
.Correct one is
tns-core-modules/data/observable
ObservableArray
is imported fromtns-core-modules/data/observable-array/observable-array
.Correct one is
tns-core-modules/data/observable-array
View
is imported fromtns-core-modules/ui/page/page
Correct one is
tns-core-modules/ui/core/view
GridLayout
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 )
The text was updated successfully, but these errors were encountered: