code: def _generate_type(self, data_type, indent_spaces, extra_args):
          
          if is_alias(data_type):
              self._generate_alias_type(data_type)
          elif is_struct_type(data_type):
              self._generate_struct_type(data_type, indent_spaces, extra_args)
          elif is_union_type(data_type):
              self._generate_union_type(data_type, indent_spaces)
docs: Generates a TypeScript type for the given type.