You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Printed @as names of fields and constructors turn non-ASCII letters into other characters #9142
When a type declaration is printed (error messages, hover, createInterface), the @as names of record fields and variant constructors are escaped the OCaml way (%S in Printtyp.tree_of_constructor, String.escaped in Res_outcome_printer). Non-ASCII bytes become decimal escapes like \195\169, which ReScript reads back as different characters.
so a generated interface gives the fields and constructors other runtime names than the implementation. Error messages and hover show the escapes too.
The @tag name of a declaration is printed with String_literal.encode_js_string since #9136, which keeps non-ASCII letters and escapes only what a string literal needs.
Activity
Print @as names and external strings as ReScript string literals
Print @as names and external strings as ReScript string literals
Print @as names and external strings as ReScript string literals