def _generate_type(self, data_type, indent_spaces, extra_args):
if is_alias(data_type):<EOL><INDENT>self._generate_alias_type(data_type)<EOL><DEDENT>elif is_struct_type(data_type):<EOL><INDENT>self._generate_struct_type(data_type, indent_spaces, extra_args)<EOL><DEDENT>elif is_union_type(data_type):<EOL><INDENT>self._generate_union_type(data_type, indent_spaces)<EOL><DEDENT>
Generates a TypeScript type for the given type.