{{#def.members}}

{{

var isDictionary = function (idlType, refTypeMap) {
  var retValue = false;
  var typeName = idlType.idlType;
  if (refTypeMap && refTypeMap[typeName] && refTypeMap[typeName].type == 'dictionary') {
    retValue = true;
  }
  return retValue;
};

var extractAllReferenceDictionaryType = function(def, refTypeMap) {
  var result = {
    interfaces: {},
    interfaceArray: []
  };

  function processType(entity) {
    if (isDictionary(entity.idlType, refTypeMap)) {
      var typeName = entity.idlType.idlType;
      var interfaceDef = refTypeMap[typeName];
      if (! result.interfaces[typeName]) {
        result.interfaceArray.push(interfaceDef);
        result.interfaces[typeName] = interfaceDef;
      }
    }
  }

  getAllMembersExceptStringifierMethod(def).forEach(member => {
    processType(member);
    if (member.type === 'operation') {
      member.arguments.forEach(arg => {
        processType(arg);
      });
    }
  });

  return result;
};

}}
