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
So our company just switched to NativeScript from Cordova, and we're used to VSCode being able to auto-import classes etc. that reside in node_modules. However that doesn't seem to work for NativeScript, where it works for everything else.
Which platform(s) does your issue occur on?
Mac/Windows
Please provide the following version numbers that your issue occurs with:
Confirm that VSCode can't figure out where ModalDialogService is located ('No suggestions' dialog).
Now confirm that you have the module already, by pasting the import import { ModalDialogService } from 'nativescript-angular/directives/dialogs';
Auto imports is a really important feature to us, being new at the framework in general. It greatly speeds up our workflow.
So creating a references.d.ts file with the contents: /// <reference path="node_modules/tns-core-modules/tns-core-modules.d.ts" /> fixes the problem.
Any reason creating a new plugin doesn't ship with this?
Also, have you considered using the @types functionality that TS2.0 introduced? I'm talking about something like npm install @types/tns-core-modules --save-dev.
From @larssn on September 19, 2018 8:8
Tell us about the problem
So our company just switched to NativeScript from Cordova, and we're used to VSCode being able to auto-import classes etc. that reside in node_modules. However that doesn't seem to work for NativeScript, where it works for everything else.
Which platform(s) does your issue occur on?
Mac/Windows
Please provide the following version numbers that your issue occurs with:
"nativescript-angular": "^6.1.0",
"nativescript-plugin-firebase": "^6.8.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-listview": "^3.6.1",
"nativescript-ui-sidedrawer": "~4.2.0",
Please tell us how to recreate the issue in as much detail as possible.
Just create a new NS angular project. Go into app.component.ts and paste the following constructor.
Confirm that VSCode can't figure out where
ModalDialogService
is located ('No suggestions' dialog).Now confirm that you have the module already, by pasting the import
import { ModalDialogService } from 'nativescript-angular/directives/dialogs';
Auto imports is a really important feature to us, being new at the framework in general. It greatly speeds up our workflow.
Copied from original issue: NativeScript/NativeScript#6279
The text was updated successfully, but these errors were encountered: