fix(types): parametrize QueryList.

This commit is contained in:
Rado Kirov
2015-06-03 15:39:20 -07:00
parent 20e874d3c6
commit 552985e305
8 changed files with 17 additions and 19 deletions
@@ -157,8 +157,8 @@ class NeedsAttributeNoType {
@Injectable()
class NeedsQuery {
query: QueryList;
constructor(@Query(CountingDirective) query: QueryList) { this.query = query; }
query: QueryList<CountingDirective>;
constructor(@Query(CountingDirective) query: QueryList<CountingDirective>) { this.query = query; }
}
@Injectable()
@@ -1540,10 +1540,10 @@ class ToolbarViewContainer {
})
@Injectable()
class ToolbarComponent {
query: QueryList;
query: QueryList<ToolbarPart>;
ctxProp: string;
constructor(@Query(ToolbarPart) query: QueryList) {
constructor(@Query(ToolbarPart) query: QueryList<ToolbarPart>) {
this.ctxProp = 'hello world';
this.query = query;
}
@@ -98,8 +98,8 @@ class TextDirective {
@View({directives: [NgFor], template: '<div *ng-for="var dir of query">{{dir.text}}|</div>'})
@Injectable()
class NeedsQuery {
query: QueryList;
constructor(@Query(TextDirective) query: QueryList) { this.query = query; }
query: QueryList<TextDirective>;
constructor(@Query(TextDirective) query: QueryList<TextDirective>) { this.query = query; }
}
var _constructiontext = 0;
@@ -46,10 +46,10 @@ class App {
template: `{{frame.name}}(<span *ng-for="var lock of locks">{{lock.name}}</span>)`
})
class Door {
locks: QueryList;
locks: QueryList<Lock>;
frame: Frame;
constructor(@Query(forwardRef(() => Lock)) locks: QueryList,
constructor(@Query(forwardRef(() => Lock)) locks: QueryList<Lock>,
@Inject(forwardRef(() => Frame)) frame: Frame) {
this.frame = frame;
this.locks = locks;