cesium
cesium copied to clipboard
`time` param of CallbackProperty.Callback should be optional
Feature
According to the current signature, the callback has 2 params:
-
time
, of typeJulianDate
-
result
, an optional object
This implies that every CallbackProperty is time dependent. But this is not necessarily the case, as shown in this Sandcastle.
In my local app, I have the use case that sometimes, I need to get the current value of such a property elsewhere. I can do this using getValue(time)
, although I don't need time
, so I just pass undefined
instead. However, I am using Typescript strict type checking, so the ts compiler does not allow me to pass null
or undefined
or anything other than a JulianDate. My current workaround is to write getValue(undefined!)
, which is syntactically correct, but looks confusing at best, but mostly it looks wrong.
Would it be possible to make the time
parameter optional, just as the result
parameter? Or would that break something?