Questions tagged [typescript2.2]

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

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

TypeScript 2.2 documentation

52 questions
0
votes
1 answer

d.ts file cannot "see" type declaration

I have this structure: dts/ my-types.d.ts lib/ a.ts a.d.ts b.ts b.d.ts a.ts and b.ts both reference a certain type, lets's call it IFoo. Because they share IFoo, I want to put that declaration in a shared location, so I put IFoo in…
Alexander Mills
  • 1
  • 80
  • 344
  • 642
0
votes
0 answers

TypeScript picks up only fraction of files in my lib directory, no idea why

I am having a problem with TS where the tsc compiler is not picking up all the .ts/.js files in my lib directory. It's a very simple problem, not sure why it's happening. tsc is only picking up about 20% of the total number of files. Anybody know…
Alexander Mills
  • 1
  • 80
  • 344
  • 642
0
votes
0 answers

Cannot compile ts 2.2.2 file using Visual Studio Code

I cannot compile single ts-2.2.2 file, output I get is: error TS5023: Unknown compiler option 'strictNullChecks'. error TS5023: Unknown compiler option 'alwaysStrict'. In the bottom-right corner VSCode displays TypeScript 2.2.2 which is the…
user3284063
  • 633
  • 3
  • 18
0
votes
1 answer

TypeScript warning => TS7017: Index signature of object type implicitly has any type

I am getting the following TypeScript warning - Index signature of object type implicitly has any type Here is the code that cases the warning: Object.keys(events).forEach(function (k: string) { const ev: ISumanEvent = events[k]; // warning is…
Alexander Mills
  • 1
  • 80
  • 344
  • 642
0
votes
1 answer

How do I consume custom type definitions for an npm module?

I have written type definitions for the npm package react-sortable-tree. I am unable to figure how I should consume it. Here's what I have tried. I named the definition file react-sortable-tree/index.d.ts (following directions given in Typescript…
0
votes
1 answer

Destructuring assignment with private properties at class results in "never used"

I'm declaring two private, static and read—only properties in a class body. At the class methods, I'm not trying to get the properties by using indexing expressions in the class object, I'm using destructuring assignment in a const…
Klaider
  • 3,140
  • 3
  • 20
  • 49
-3
votes
1 answer

Why Date() returns wrong date?

I have the following function: public static addDaysNextPrev(operation: number, date: Date = new Date(), days: number = 7): IDateCalendarNextPrev { const currentDate = new Date(date); const prevDate = new Date(date); …
dooglu
  • 241
  • 4
  • 9
1 2 3
4