In our TypeScript code for Functions on Objects, we’re writing a lot of object.property ?? 0 code, where we handle the case of property being undefined to “force it” to a specific default value.
Is there a way how we can set this default property in the ontology? So that we ensure that it’s never undefined and simplifies our code by just using object.property?
You can set the property as Required (docs). Then you can set any defaults in the pipeline/actions. I’m not sure if this actually changes the TS interface that functions generates but it does mean you should just be able to use the non-null assertion operator instead that should be a lot easier (myobject.name!).