phetsims / axon

Axon provides powerful and concise models for interactive simulations, based on observable Properties and related patterns.
MIT License
10 stars 8 forks source link

Assert that DerivedProperty.and/or are provided dependencies. #368

Closed zepumph closed 2 years ago

zepumph commented 2 years ago

The default values for these factories when there are no provided dependencies have strange default values. It seems buggy and like we should guard against it:

const x = phet.axon.DerivedProperty.and( [])
->undefined
x.value
->true
zepumph commented 2 years ago

I fuzzed each simulation and there were no hits, so I'm committing. Closing