When I use my custom object constructor for object.keys and .values in .ts files, everything works fine. However, when I try to use them in .tsx files, the compiler interprets it as JSX and I get an error.
const myObject = (<TypedObject>Object).keys()
The usual tricks of adding a comma or extending the type with {} or unknown do not seem to work in this case.