BrunoLM
BrunoLM

Reputation: 100331

Errors trying to compile TypeScript compiler

I just got TypeScript source code using git pull and tried to compile as described here. But then I get lots of this error

'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.

Is that the right way to compile? Is new T[] a new feature and I need the latest compiler to compile the compiler?

How should I compile TypeScript projects?

Upvotes: 0

Views: 357

Answers (1)

BrunoLM
BrunoLM

Reputation: 100331

I got it working. I was getting errors because I was at the master branch which is broken.

My steps:

  1. Clone git clone https://git01.codeplex.com/typescript
  2. Switch to develop branch git checkout -b develop origin/develop
  3. Installed node.js
  4. Installed Jake (npm install -g jake)
  5. Compile (jake local on project's root folder)

I replaced the new compiled files on the compiler folder

C:\Program Files (x86)\Microsoft SDKs\TypeScript

And ran tsc test.ts, and it worked.

Note: The develop branch compiles, but it is definitely not stable, beware.

Upvotes: 1

Related Questions