I have an angular project I'm writing in typescript. This worked well for me under VS, and now I'm trying the same with Node.JS under webstorm.
I have a progressor class, in a progressor.ts file:
export class Progressor{
public tasks: any;
constructor(){
this.tasks = {};
}
...
}
and I have my main controller, which uses this class:
/// <reference path="../progressor.ts" />
declare var angular: any; // I'm trying to eliminate these...
declare var Papa: any;
declare var $: any;
class MainController{
constructor($scope: any){
$scope.progressor = null;
$scope.filesDropped = function(files, rejectedFiles){
if(!files || !files.length)
return;
$scope.progressor = new Progressor();
// ...
}
};
}
Note that this is not Node.JS code - it is simply part of a Node.JS project.
The relative reference path is correct. When I try to compile it using:
tsc mainController.ts --module amd --target es5
I get an error: Cannot find name Progressor.
I don't understand what's the problem... I've been having nothing but trouble with my Node.JS project so far, and I'm considering giving up on TS altogether for this project. First of all - can anyone tell me why it won't compile? Note that I want each TS file to be compiled separately, so I can debug them comfortably via Chrome.