fix(typings): fix typings which were previously unchecked

Closes #4625
This commit is contained in:
Alex Eagle
2015-10-08 22:44:58 -07:00
committed by Alex Eagle
parent 597f79e0c7
commit c178ad476e
5 changed files with 10 additions and 8 deletions

View File

@ -212,13 +212,15 @@ function _createProtoQueryRefs(bindings: BindingWithVisibility[]): ProtoQueryRef
var res = [];
ListWrapper.forEachWithIndex(bindings, (b, i) => {
if (b.binding instanceof DirectiveBinding) {
var directiveBinding = <DirectiveBinding>b.binding;
// field queries
var queries: QueryMetadataWithSetter[] = b.binding.queries;
var queries: QueryMetadataWithSetter[] = directiveBinding.queries;
queries.forEach(q => res.push(new ProtoQueryRef(i, q.setter, q.metadata)));
// queries passed into the constructor.
// TODO: remove this after constructor queries are no longer supported
var deps: DirectiveDependency[] = b.binding.resolvedFactories[0].dependencies;
var deps: DirectiveDependency[] =
<DirectiveDependency[]>directiveBinding.resolvedFactory.dependencies;
deps.forEach(d => {
if (isPresent(d.queryDecorator)) res.push(new ProtoQueryRef(i, null, d.queryDecorator));
});