-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version:
1.8.7
Code
Having three classes like this:
import {Subject} from 'rxjs/Rx';
import {Task} from '../../models/task'
import {TaskStore} from "../task-store/task-store";
export class TaskService {
//foo = "bar"; // -> commenting in solves slow compilation
tasks: Subject<Task[]>;
}
import {Task} from "../../models/task";
import {BehaviorSubject} from "rxjs/Rx";
export class TaskStore {
tasks = new BehaviorSubject([]);
//tasks = new BehaviorSubject<Task[]>([]); // -> change above line withis this one solves slow compilation
//_tasks = new BehaviorSubject([]); // -> change above line withis this one solves slow compilation
}
import {bootstrap} from 'angular2/platform/browser';
import {TaskStore} from "./app/services/task-store/task-store";
import {TaskService} from './app/services/task-service/task-service';
class TestClass {
}
bootstrap(TestClass, [
TaskService,
TaskStore,
]);
leads to super slow compilation. Commenting in any of the lines above makes the compilation about 6 times faster.
See this repositiory as a reference for the problem:
https://github.com/choeller/slow-ts-compiler-demo/
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue