Posts

Showing posts with the label typescript

Using TypeScript in Visual Studio 2017

Image
See this link for very similar instructions: https://www.typescriptlang.org/docs/handbook/asp-net-core.html Step 1: Create a new Asp.Net Core project Select Empty project: Click OK. Step 2: Add Microsoft.AspNetCore.StaticFiles via NuGet Right click on Dependencies and select Manage NuGet Packages: Select Browse and search for 'Microsoft.AspNetCore.StaticFiles': Select this item and click Install. Step 3: Add a scripts folder for TypeScript First update the body of Configure in Startup.cs file as shown: Startup.cs [code language="csharp"] using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace AspDotNetCore { public class Startup { // This method gets called by the runtime. Use this method to add services to the container. // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices...

Getting started with TypeScript in Visual Studio Code

Image
Some instructions that distill how one may get started with using TypeScript in Visual Studio Code. Step 1: Set up your development environment Download and run the installer for Visual Studio Code from the following link: https://code.visualstudio.com/download Step 2: Install node.js Download and run the installer for node.js from the following link: https://nodejs.org/ Step 3: Install TypeScript Once node.js has been installed you can install TypeScript. Close VS Code if opened and open a command prompt and run the command: [code language="xml"] npm install -g typescript [/code] (Use the -g to ensure typescript is installed globally, not just for the folder you are in.) Step 4: Set up an example project Open VS Code. Create a new Terminal by selecting Terminal > New Terminal. Create a directory for your project using the mkdir command and navigate to that folder: Close the terminal and open the folder you just created by selecting File...