class Bar {} class Foo { // Without the correct babel plugins this will throw an error public bar = new Bar() } const ClassWithClassField = () => { return

{new Foo().bar.toString()}

} export default ClassWithClassField