Top "Typescript2.2" questions

Use this tag for questions specific to new features in TypeScript 2.2. For general TypeScript questions, the correct tag is TypeScript.

error TS2345: Argument of type 'T' is not assignable to parameter of type 'object'

The code below was working fine with TypeScript 2.1.6: function create<T>(prototype: T, pojo: Object): T { // ... return Object.…

typescript typescript2.2
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
Importing nodejs `fs` with typescript when executing with ts-node?

I'm trying to run the following code with ts-node. import { writeFileSync, readFileSync } from 'fs'; However I get: src/main/ts/…

node.js typescript typescript2.2 ts-node
Typescript Error: Property 'append' does not exist on type 'HTMLElement'

The Problem: I'm receiving a Typescript 2.2.1 compilation error when trying to append a compiled angular 1.5 template to an existing HTMLElement. …

javascript angularjs typescript typescript2.2
How to install TypeScript 2.2 onto Visual Studio 2017

Some people in our team have both Visual Studio 2015 and Visual Studio 2017 installed. Others only have the latest Visual Studio 2017 (15.5). …

visual-studio typescript visual-studio-2017 typescript2.2
typescript 2.2 interfaces extend object type

I have function using an object as parameter like this: interface Options { foo?: string; bar?: number; }; function fooNction(opts: Options): …

typescript typescript2.2