Top "Typescript2.0" questions

Tag for questions specific to new features in TypeScript 2.x. For general TypeScript questions, the correct tag is TypeScript.

Import module from root path in TypeScript

Let's suppose I've a project, and its main source directory is: C:\product\src Based on this directory, every import …

typescript typescript2.0 typescript1.8 typescript2.1 typescript2.2
How to merge two enums in TypeScript

Suppose I have two enums as described below in Typescript, then How do I merge them enum Mammals { Humans, Bats, …

typescript types enums merge typescript2.0
How to cast to array in TypeScript 2?

I had some code that cast an object to type array (so I could use array functions on the object …

javascript typescript casting typescript2.0
Describe property object in TypeScript interface

I want to describe some interface with nested objects. How can I do it without creation of Interfaces for nested …

typescript types type-conversion webstorm typescript2.0
Update Typescript in Angular2 project

I have an Angular2 project using Typescript, in Visual Studio. I want to update Typescript from 1.8 to 2.0.x. In my …

visual-studio angular typescript-typings typescript2.0
'this' is undefined inside the foreach loop

I am writing some typescript code and iterating an array. Inside the loop, I am trying to access 'this' object …

typescript typescript2.0 typescript1.8
How do I toggle bootstrap 4 modal using Angular2 Component/ Typescript

I am not able to toggle a bootstrap modal using Typescript. I am using the default bootstrap 4 Modal. Here is …

angular typescript2.0 twitter-bootstrap-4
Typescript : underscore convention for members

I have a class Email class Email { private _from: string; private _to: Array<string>; private _subject: string; } It'll …

javascript typescript ecmascript-6 typescript2.0 es6-class
Purpose of declare keyword in TypeScript

What is the purpose of the declare keyword? type Callback = (err: Error | String, data: Array<CalledBackData>) => void; …

typescript typescript2.0
Import js file with TypeScript 2.0

Abstract I'm trying to import ".js" file from an external location (i.e. node_modules) I'm trying to do this …

javascript node.js typescript typescript2.0