Handling Nested Class Structs in Schema Instances

When creating instances of Schema.Class structs that include nested classes structs using new/make, the type system does not warn you that you need to explicitly make the type of the child property, but it fails at runtime. Is there anything one can do to avoid this potential footgun?

Foo.make({ bar: Bar.make({}) }) vs. Foo.make({ bar: {} })
Was this page helpful?