Category "typescript2.0"

TypeScript and React - children type?

I have a very simple functional component as follows: import * as React from 'react'; export interface AuxProps { children: React.ReactNode } const a

Typescript: Evaluate type of generic function

Is there any trick to "evaluate" the type of a generic fuction? Consider the following: type Arr = <A>() => A[] type Ev<G, A> = ??? Question: I

Create container module - export * as x from 'y'

I have this in a module: export const Category = require('./category'); export const Roles = require('./roles'); export const FunctionalTeams = require('./func

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 write file 'C:/{{my-project}}/

Where does the lib come from in typecsript?

I have a typescript@2 project. I wanted to use some ecma2017 features. I found out that one can apply a lib in the compilerOptions in the tsconfig.json: "targe

How do I compile my TypeScript code for Node.js to one file?

I want to compile TypeScript to one file when using with Node.js. I have tried configuring "tsconfig.json" like this: "compilerOptions": { "module": "common

What is reason to use is operator in TypeScript?

What is reason to use is operator in TypeScript in this case? type Species = "cat" | "dog"; interface Pet { species: Species } interface Cat extends Pet

Angular 4.3.3 HttpClient : How get value from the header of a response?

( Editor: VS Code; Typescript: 2.2.1 ) The purpose is to get the headers of the response of the request Assume a POST request with HttpClient in a Service i