code: function queryDef(flags, id, bindings) {
      var bindingDefs = [];
      for (var propName in bindings) {
          var bindingType = bindings[propName];
          bindingDefs.push({ propName: propName, bindingType: bindingType });
      }
      return {
          // will bet set by the view definition
          nodeIndex: -1,
          parent: null,
          renderParent: null,
          bindingIndex: -1,
          outputIndex: -1,
          // regular values
          // TODO(vicb): check
          checkIndex: -1, flags: flags,
          childFlags: 0,
          directChildFlags: 0,
          childMatchedQueries: 0,
          ngContentIndex: -1,
          matchedQueries: {},
          matchedQueryIds: 0,
          references: {},
          childCount: 0,
          bindings: [],
          bindingFlags: 0,
          outputs: [],
          element: null,
          provider: null,
          text: null,
          query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },
          ngContent: null
      };
  }
docs: @license
  Copyright Google Inc. All Rights Reserved.
  
  Use of this source code is governed by an MIT-style license that can be
  found in the LICENSE file at https://angular.io/license