AngularJS + Visual Studio Code Intellisense - visual-studio-code

I created an AngularJS project and downloaded #types for angular. (npm install --save-dev "#types/angular")
My problem is that in VSCode it looks like I don't get any type information for DI services like $scope, $http etc. For angular itself I get the list fine, but for $ services I don't.
For instance $http is reported as 'any'.
How can I get Intellisense and type information for those services too?

What you have done is correct, always VSCode did not support intellisence for injecting services such as $http.
You can't get support for those afaik. Since this has been stopped according to this issue.

Related

SAPUI5 Can't run local Fiori Application properly from VS Code

We used this tutorial to start developing Fiori apps with VS Code:
https://blogs.sap.com/2020/07/16/developing-sap-fiori-app-using-sap-fiori-tools-in-visual-studio-code/
Everything works fine so far, except the connection to the backend services. When we want to start the application locally we get the following error by getting the OData metadata.
Our server config in ui5-local.yaml:
Before switching to VS Code we used the local WebIDE which worked fine. So I guess there is no configuration on the SAP system which blocks the request.
Did anyone face the same issue and has a solution for us? I searched online and couldn't find anything that fits our problem.
Thanks a lot for any hints.
try this npm install ui5-middleware-proxy-basicauth --save-dev
Are you by any chance in corporate network which uses Self-Signed Certificate. If so npm might fail. Change the ignoreCertError: true and give it a try.

Error issuing session token: HostAuthorizationNotFound

Im developing TFS extension using angular and when I debugging the extension I unable to make rest calls using the VSS SDK, it try to make a request to WebPlatformAuth but it throw exception:
"Error issuing session token: HostAuthorizationNotFound".
Just to make it clear, Im able to use VSS to get WebContext for example project.name or user.id.
(I debug my extension by running ng serve on my localhost and provide the extension manifest "baseUri" field).
UPDATE - It happen also when I deploy the extension without the baseUri - not in debug mode.
Just to mention, I also developed another simple extension using only html and jquery and it worked just fine without any additional configurations.
Apparently I just had to enter the 'manage extensions' page at the Azure Devops and give my extension the authorization to the actions it ask for.
Uninstalling and reinstalling seemed not to help because we switched to a different version of the extension. When I uninstalled and reinstalled the SAME version, the extension worked again!

Problem with Flow Language Support on VSCode and the autocomplete feature for react-native app

I have initiated a react-native project and added flow language support extention in vscode to use it's features. As it is mentioned in flow-for-vscode, after installing the extension, I should be able to run flow commands, but the terminal doesn't recognize the flow word. Although flow works for type checking and shows the errors in a good way, it doesn't show the autocomplete for class or type properties and methods. How can I solve this issue? I'm using Windows and flow version 0.107.0 and vs-code version 1.40.1.
I finally found a workaround. It seems flow.useLSP has some issues, so I disabled it and just installed flow using yarn (or npm). Everything working fine by now.

Aurelia + JSPM + Typescript browser-side debugging

I has been experimenting with Aurelia build options vis-a-vis development/build workflow. We have concluded that we prefer that developers test the web site while it is bundled, versus serving up all the individual files to the browser. Additionally, we are using TypeScript. And we want have the browser-side debugging experience provided by source maps. I am working with what will be a large application with many Aurelia components, so the few seconds for the page to refresh during the active development change/refresh or watch cycle seems like it will add up. And it seems that if developers are working in the bundles that bundling issues will be discovered immediately.
Using the Aurelia-cli (v23), and creating a new project using TypeScript, then building creates RequireJS bundles and source maps work for browser debugging. That is, after running au run.
Using the skeleton-typescript-webpack starter project (downloaded two weeks ago), then running npm start also provides browser side debugging of typescript of webpacked bundles.
Using skeleton-typescript which uses jspm and systemjs, running gulp serve-bundle does not provide client side typescript debugging. However, gulp serve does provides client side debugging, but the site is not bundled. The only difference between those gulp tasks is that the site is bundled, versus unbundled.
So it seems that typescript source map client side debugging of bundled sites will work with Aurelia-cli and webpack, but not with jspm.
Our project was started based on the skeleton-typescript. Before we refactor the build workflow, I have attempted to figure out how to get jspm to support typescript debugging on the browser.
I've hunted the web, but did not find any clear direction, and did much experimentation with configuration settings with a trial and error approach, but cannot seem to get a bundled jspm site to allow the client side typescript debugging experience.
Is this a limitation of jspm or systemJS or the Aurelia-Bundler? Or is there some configuration setting, in config.js or bundles.js, I need to add to the skeleton-typescript starter project to get this to work?
Maybe your are not getting access to source maps. I'm not sure, I remenber something about the way how source map are generated, (inline, file in a specific folder) and add mapping path in the server to make them acessible.
https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript-aspnetcore/src/skeleton/Startup.cs#L69-L74

Features and Configuration of the Typescript Eclipse Plugin

I'm interested in developing with typescript on linux. So I found the above mentioned plugin. I installed eclipse and also the eclipse-typescript plugin as described here. Now I can edit typescript files and see the highlighting. But it is not possible to debug a script. When I try to debug it, there is no debug configuration available.
Is the plugin able to debug a typescript?
I also read in this wiki, but this single page doesn't help me. I googled around and did not found any howto or help...
Thanks
Is the plugin able to debug a typescript?
It isn't supported. Based on my empirical (but certain) observation of : https://github.com/palantir/eclipse-typescript/tree/master/Bridge/src
You could debug the generated JavaScript though (and I highly recommend you do that anyways). And in fact learn to use google chrome debug tools (you'll thank me someday) since they have a live edit and continue, repl, profiler etc.
Alternatively you can try WebStorm which fully supports debugging TypeScript on linux.
At the same time, TypEcs (another TypeScript plugin for Eclipse) features debugging - http://typecsdev.com/. The plugin supports two modes of TypeScript debug:
Standalone: this mode is suitable for debugging server-side NodeJS applications written on TypeScript,
Web Remote: this mode is connected to Google Chrome web browser and allows you to debug TypeScript web application.
So you can try this one.