String Generation With Nested Single Quotes

If I have string in a struct with an apostrophe, string generation in the thrift js compiler will generate a malformed and un-escaped string, this wraps the outputted string in double quotes rather than single quotes.