Platform
Issue
The toJSON methods within serialization.ts are not properly checking the type of value. The parent class, PropertyDefinition, allows any as the value type, so typescript will allow any type to be passed to the overloaded methods on the child classes.
See this typescript example
Proposed solution:
Allow all methods to accept any for value and do additional checking within the methods.
See this PR (only some portions are relevant): #7762
Platform
Issue
The
toJSONmethods withinserialization.tsare not properly checking the type ofvalue. The parent class,PropertyDefinition, allowsanyas the value type, so typescript will allow any type to be passed to the overloaded methods on the child classes.See this typescript example
Proposed solution:
Allow all methods to accept
anyforvalueand do additional checking within the methods.See this PR (only some portions are relevant): #7762