Top "Typescript2.0" questions

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

TypeScript character type?

My question is very brief. I am new to TypeScript, been searching around here and there but didn't find yet …

javascript typescript typescript-typings typescript2.0
Typescript: how to import a class from a javascript file?

I would like to : Import a js file that defines a class: ./myClass/index.js Declare the public methods of …

javascript typescript typescript-typings typescript2.0
Usage of the TypeScript compiler argument 'skipLibCheck'

I've been researching around for a further explanation into the skipLibCheck TypeScript compiler argument to determine the safety of having …

typescript typescript-typings typescript2.0
document.getElementById("id") may be null

Edit: I'm using TypeScript v2.2.1 I am new to TypeScript and I'm not sure what the cleanest way of dealing …

typescript typescript2.0
TS - Only a void function can be called with the 'new' keyword

I am getting this weird error from TypeScript: "Only a void function can be called with the 'new' keyword." What? …

node.js typescript typescript2.0
How to rewrite the protected/private route using TypeScript and React-Router 4 and 5?

I was trying to create a <PrivateRoute> as describe in the react-router documents using TypeScript. Can anyone help …

reactjs typescript react-router typescript2.0 react-router-v4
JSX element type 'App' is not a constructor function for JSX elements. Types of property 'setState' are incompatible

I am using the Microsoft TypeScript-React-Starter and got this compile error during npm start: ./src/index.tsx (16,5): error TS2605: JSX …

reactjs typescript2.0
TSLint - Preventing error: The key is not sorted alphabetically

I'm doing a test app with Ionic2 / Cordova / Typescript / Angular. I'm using tslint 5.6.0. I'm using the following module: https://www.…

reactjs typescript typescript2.0 lint tslint
Does TypeScript have a Null-conditional operator

Is there any operator like ?. in TypeScript that can check if the variable is null or not defined like Kotlin? …

typescript typescript2.0
Type error: Object is possibly 'null'. TS2531 for window.document

Adding Typescript to my project for the first time. At one place i have used window.document.getElementById to access …

javascript typescript typescript2.0