phetsims / graphing-quadratics

"Graphing Quadratics" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
1 stars 4 forks source link

TypeScript cleanup #182

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago
const sliderProperty = new DynamicProperty<IntentionalAny, IntentionalAny, IntentionalAny>( new Property( coefficientProperty ), {
    // @ts-expect-error TS2345: Argument of type 'DynamicProperty<any, any, number>' is not assignable to parameter of type 'Property<number>
    super( sliderProperty, sliderRange, options );
    "rules": {
      "@typescript-eslint/no-explicit-any": "error",
      "@typescript-eslint/ban-ts-comment": "error"
    }
pixelzoom commented 1 year ago

Done, closing.

The problems in GQSlider were due to a bug in VSlider, introduced in phetsims/axon#382. The fix was:

-  public constructor( valueProperty: Property<number>, range: Range, options?: VSliderOptions ) {
+  public constructor( valueProperty: LinkableProperty<number>, range: Range, options?: VSliderOptions ) {