Hey guys,
type
TestObj = object
field1: int
field2: float
field3: string
I need to use an object, like the one above, as a parameter for quite a few javascript functions. In some cases, I don't want field`x` to be shown in the resulting javascript code- only the field/s I'm using.
Is there a way to only display the fields I'm actively using when passing an object like so: wrappedFunction(TestObj(field1:9000))
to produce: function({field1:9000}
rather than the default: function({field1:9000, field2:0.0, field3:""})
If I'm not clear enough please let me know