def _MapObjcType(t, other_types):
  """Returns an Objective-C type name for the given IDL type."""
  if t.element_type:
    assert t.name == 'sequence'
    return 'NSArray<%s>*' % _MapObjcType(t.element_type, other_types)
  elif t.name in other_types:
    return 'Shaka%s*' % t.name
  else:
    type_map = {
        # IDL   ->  Objective-C
        'boolean': 'BOOL',
        'double': 'double',
        'DOMString': 'NSString*',
    }
    assert t.name in type_map, 'Type %s not found' % t.name
    return type_map[t.name]