#NEWLINE# def _SetTypeAlias( js_type , alias_map ) : #NEWLINE# #INDENT# 'Updates the alias for identifiers in a type.\n\n  Args:\n    js_type: A typeannotation.TypeAnnotation instance.\n    alias_map: A dictionary mapping a symbol to an alias.\n  ' #NEWLINE# aliased_symbol = _GetAliasForIdentifier ( js_type . identifier , alias_map ) #NEWLINE# if aliased_symbol : #NEWLINE# #INDENT# js_type . alias = aliased_symbol #NEWLINE# #UNINDENT# for sub_type in js_type . IterTypes ( ) : #NEWLINE# #INDENT# _SetTypeAlias ( sub_type , alias_map )