Top "Typescript2.0" questions

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

How to use @types/express-session?

when I write this: import { Request } from 'express-serve-static-core'; router.post((req: Request, res, next) => { req.session.user = user; } tsc …

typescript typescript-typings typescript2.0 express-session
tsc - ignore errors at command line

I have this: $ tsc -m amd --outFile dist/out.js lib/index.ts lib/index.ts(87,48): error TS1005: ';' …

typescript typescript2.0 tsc
Extend a namespace from package typings

I'm trying here to extend a namespace from package typings, @typings/fullcalendar. /// <reference path="./types/fullcalendar" /> import * as …

typescript typescript2.0
experimental support for decorators visual studio 2017

I have created a .Net Core project with AngularJS in Visual Studio 2017 however when I am trying to create a …

angular typescript typescript2.0 asp.net-core-2.1
error TS2349: Cannot invoke an expression whose type lacks a call signature

I am using Angular 2 with TypeScript 2. When I use let labels: string[] | number[] = []; // let labels: Array<number> | Array&…

angular typescript typescript2.0
I want totally immutable object in TS

I have some big object, like const a={ b:33, c:[78, 99], d:{e:{f:{g:true, h:{boom:'selecta'}}}};/// well, even …

typescript typescript2.0
After upgrading TypeScript, Angular controller registration now fails to compile

We were using TypeScript 2.2. After upgrading to 2.4, we now get this on compilation: error TS2345: Argument of type 'typeof TopMenuController' …

angularjs typescript typescript2.0
What is the TypeScript equivalent of React.PropTypes.node?

I have searched high and low, and I can find TypeScript equivalents for everything except React's PropTypes.node. I know …

reactjs typescript2.0
How to use ALERTIFY JS (v1.9.0) in angular 2

I am trying to get AlertifyJS (v1.9.0) to work in my angular 2 app. I have the following in vendor.ts …

angular typescript2.0 alertifyjs
Exporting enums in Angular modules

Does anyone know if it’s possible to export enums in Angular modules? If not, are there any best practises …

javascript angular enums typescript2.0 angular-module