fix(types): parametrize QueryList.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user