I really enjoy to work with VS Code and intellisense is great, but I can't seem to get it to work with Jasmine and its matches.
This is what im looking for:
If you have Jasmine in your node_modules locally, VS Code should pick it and provide intellisense automatically. Otherwise you can install just typings with npm i #types/jasmine.
Related
I've read Q/As but still confused the whys and hows. I would like to have a managable correct method to add typescript typings to my ASP NET Core 3 (preview 5) web application when adding a javascript library
I've installed npm, followed the github readme of DefinitelyTyped:
npm install --save-dev #types/jquery
but this created a ./node_modules/#types/jquery/ folder relative to the current folder. (I would be a liar stating I understood how this knew I wanted the typings and not jQuery itself)
Question
What are the simple instructions to add/remove typings with a package manager and where is the correct place of them and how to configure the IDE build and intellisense to find them...
I'm working on an angular2#beta project in VS 2013 after familiarizing myself with it in IntelliJ. IntelliJ can be set to find the tsconfig.json file and, as of TypeScript 1.6, it can therefore read the "exclude" property and not attempt to compile any of the node_modules. Now that I've moved to VS 2013 with TypeScript 1.7, I'm running into the issue where it's trying to compile the node_modules. I've included the tsconfig.json, but from what I've read, tsconfig.json is fully supported only in VS 2015. Is that the latest on this issue? Is there some way to tell VS 2013 to exclude those files or to use my tsconfig.json instead?
I should also note that angular2#beta includes its typings with the rest of its source when I do an npm install. This puts all the typings mixed in with all the files, and I assume perhaps I could have to delete all the non-.d.ts files to get the typings without all the other errors. Previously you could use "tsd install angular2" to get the typings but this is no longer available. A solution to this would negate the previous problem.
Update
I can get all this working on VS 2015 - Community Edition, but I would really like to see if I can get it working on VS 2013.
Higher versions of Typescript will not be supported in Visual Studio 2013. But you don't need to edit and compile typescript files in one and the same IDE. It's handy but I use often different IDE's for the same project as long as the build processes are aligned (read: can be done by CLI). So yo can use Visual Studio Code for your Typescript work and compile it. Full support and Intellisense for the tsconfig file.
https://code.visualstudio.com/
Visual Studio cannot resolve interface ng.IScope (and others from ng module).
I have added reference to angular.d.ts but it doesn't help.
What's interesting a rectangular typings are working fine - even without adding the reference.
I am using Visual Studio 2013 Update 4 with TypeScript 1.4. Anyone can help? I tried everything.
I am using visual studio 2013 update 4 with TypeScript 1.4. Anyone can help? I tried everything :/
Suspect its just an issue of an old version lingering around. Try where tsc and make sure you only see C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\.
I have added reference to angular.d.ts but it doesn't help. What's interesting a restangular typings are working fine - even without adding the reference.
Make sure you have it added to the visual studio project.
Any luck ?
I have the same problem, however, if you use the older version
angularjs.TypeScript.DefinitelyTyped version=0.9.6
(Nuget -> Install-Package angularjs.TypeScript.DefinitelyTyped -Version 0.9.6)
everything works fine and it understands the ng.IScope definition.
I don't see any structural difference between 3.1.3 and 0.9.6, so I don't understand why the older version works.
I have a problem with Visual Studio 2013 generating too many errors when building a web application with typescript definition files. For example consider the following scenario:
Start a new Empty Web Application
Right click on project and select Manage Nuget Packages
Add jquery and jquery typings (the typings I downloaded are a couple of days old)
Build the project
Project builds successfully with more than 100 errors (errors, not warnings), all in jquery.d.ts, like the following:
',' expected.
'=' expected.
Identifier expected.
I get similar results when I do the same with angularjs instead of jquery.
Any ideas?
The most likely reason for this is that you are using an older version of TypeScript than the definition author.
The language is moving swiftly and some of the features in version 1.4 are particularly useful in definition files, so it is likely that you will need to upgrade to 1.4 so that your machine can understand these new features.
Download version 1.4 here.
I was having a similar issues like this but I was able to resolve the jQuery issues by downgrading my DefinitelyTyped version of "1.0.1" instead of "1.4.1". Also I'm currently running on Mac and hopefully this can help users who are experiencing issues on Mac.
I am running TypeScript 8.3.1 with web essentials 2.5.1, IE 10 and Visual Studio 2012. I have an app where all my ts code sits in an app folder. I have set a web essentials bundle up of that folder and the map files are all being generated.
When I look at the output of the bundled Js it has all the source mappings in there. A snippet of it below.
///#source 1 1 /app/controllers/featured-carousel-controller.js
(my code sits here)
//# sourceMappingURL=featured-carousel-controller.js.map
However I cannot seem to get TypeScript debugging working with this model. If I create a new Visual Studio project it debugs fine out of the box but not with this bundling. I noticed the sourceMappingURL does not include the folder path like the JS file does. Is that correct?
I have checked to make sure the bundled.js is in my default.html and the app works fine. Can anyone think of anything else I may need to do?
They removed some stuff from WebEssentials and rolled it into WebTools 2012.2
http://www.asp.net/vnext/overview/fall-2012-update
download:
https://www.microsoft.com/web/handlers/webpi.ashx/getinstaller/ASPDOTNETandWebTools2012_2.appids
I recall not having this functionality in VS2013 Pro, which I have at home. Now I wonder what that needs to get the same to work in that edition. If you know, please tell me.
Update 2:
Sheet....It worked for about a minute then it is telling me there are no symbols to break on.