Closed pixelzoom closed 1 year ago
You'll need to address this ts-expect-error
in Slider.ts:
// @ts-expect-error see https://github.com/phetsims/sun/issues/842
const options = optionize<SliderOptions, SelfOptions, ParentOptions>()( {
They are filled in manually based on other options, which is why they can't be set as "defaults" in the first options block,
https://github.com/phetsims/sun/blob/2bddc7f95561cff8ce6f06aaefbc73a9b465b756/js/Slider.ts#L299-L312
I refactored some bits so that all required args for the super are filled in all at once. This allowed us to get rid of the ts-expect-error
.
@jessegreenberg what is your timeframe for reviewing this issue?
Thanks for doing this @zepumph. I understand now how the factored out RequiredParentOptionsSuppliedBySlider
lets us put optional fields in options
so that we can fill in the required fields for the super later in superOptions
. It looks right to me.
I did not do any regression testing for this.
Similar to https://github.com/phetsims/scenery-phet/issues/808, and related to https://github.com/phetsims/phet-core/issues/130 ...
Slider is not setting
valueProperty
andenabledRangeProperty
in options, both of which are required by superclass (super trait?) AccessibleSlider.Assigning to @zepumph and @jessegreenberg to resolve.