Top "Typescript1.6" questions

Used for questions that relate to features or technical changes introduced in TypeScript 1.6

How to structure utility class

I have several utility functions. What is the best way to package these up, and then import them? This is …

typescript typescript1.6
NodeJS EventEmitter with TypeScript class

Is it possible to use NodeJS' events.EventEmitter with a TypeScript class? If yes, how? I've tried countless variations in …

javascript node.js typescript typescript1.6
Anonymous/inline interface implementation in TypeScript

I've just started with TypeScript and I'm trying to understand why the following inline object definition isn't considered valid. I …

javascript interface typescript typescript1.6
Type X is not a 'constructor function type' (TS2507)

While designing a definition file, I came across this error (TS2507). How can I specify a type to be a …

typescript typescript1.6
Getting warnings in Webstorm when compiling Typescript that contained Angular2 imports

I just took an example from here https://angular.io/guide/quickstart I've done all according to the quickstart manual. …

webstorm angular typescript1.6
How to properly import React JSX from separate file in Typescript 1.6

I have the following app.tsx file working fine loading an App element from a React.Component and a child …

reactjs typescript react-jsx typescript1.6
How to change the result type of a Promise< > in TypeScript

For some Typescript methods I build, often I need the asynchronicity of a promise but I do not require the …

typescript promise es6-promise typescript1.5 typescript1.6
TypeScript: Type Argument for type parameter 'R' cannot be inferred from the usage

With TypeScript 1.6 and native es6 Promises I'm getting an error whenever I use Promise.all([]) with two different return types. …

typescript promise es6-promise typescript1.6
gulp-typescript and outFile option in tsconfig.json

I'm using gulpfile.js to compile my tsconfig.json project this way: var ts = require('gulp-typescript'); var tsProject = ts.createProject(…

typescript gulp asp.net-core typescript1.6
Access to static properties via this.constructor in typescript

I want to write es6 class: class SomeClass { static prop = 123 method() { } } How to get access to static prop from method() …

typescript this static-methods static-members typescript1.6