def fmt_error_type(data_type, inside_namespace=None):
return '<STR_LIT>' % fmt_type(data_type, inside_namespace)<EOL>
Converts the error type into a TypeScript type.
inside_namespace should be set to the namespace that the reference
occurs in, or None if this parameter is not relevant.