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 configure custom global interfaces (.d.ts files) for TypeScript?

I'm currently working on a ReactJS project which uses Webpack2 and TypeScript. Everything works perfectly apart from one thing - …

typescript typescript-typings typescript2.0 typescript1.8
How to prevent "Property '...' does not exist on type 'Global'" with jsdom and typescript?

I try to convert an existing project to use Typescript and I have problems doing so with my testing setup. …

typescript jsdom typescript2.0
How to add custom "typings" in typescript 2.0 / 3.0

According to this article typings system for typescript 2.0 has changed and so it is not clear how to attach custom …

typescript typescript2.0
Typescript cannot find name window or document

For either case: document.getElementById('body'); // or window.document.getElementById('body'); I get error TS2304: Cannot find name 'window'. Am …

javascript typescript typescript2.0
Typescript error "Cannot write file ... because it would overwrite input file."

In my Typescript 2.2.1 project in Visual Studio 2015 Update 3, I am getting hundreds of errors in the error list like: Cannot …

visual-studio typescript visual-studio-2015 typescript2.0
Operator '==' cannot be applied to types x and y in Typescript 2

TypeScript Version: 2.0.2.0 Code I know the code is a bit stupid, but I actually have these kind of tests in …

typescript type-conversion typescript2.0
Typescript 2.0. "types" field in tsconfig.json

I do not understand the meaning of types field in tsconfig.json. In documentation I have read such text: "types": { "…

typescript typescript-typings typescript2.0
Type cannot be used as an index type

Go to https://www.typescriptlang.org/play/index.html and paste: let userTypes = {}; let keys = Object.keys[userTypes]; receive error: …

typescript typescript2.0
TypeScript - what type is f.e. setInterval

If I'd like to assign a type to a variable that will later be assigned a setInterval like so: this.…

javascript angular typescript typescript2.0
TypeScript multiple return types with identical parameters

Background Trying to get into the spirit of TypeScript, I am writing fully typed signatures in my Components and Services, …

typescript angular2-forms typescript2.0