Skip to content

Commit

Permalink
Make Screen type parameters required, and introduce AnyScreen, see ph…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 1, 2023
1 parent 0b758f0 commit 483ece9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common/view/NumberSuiteCommonPreferencesNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { HBox, HBoxOptions, Node, VBox } from '../../../../scenery/js/imports.js
import optionize from '../../../../phet-core/js/optionize.js';
import numberSuiteCommon from '../../numberSuiteCommon.js';
import NumberSuiteCommonPreferences from '../model/NumberSuiteCommonPreferences.js';
import Screen from '../../../../joist/js/Screen.js';
import { AnyScreen } from '../../../../joist/js/Screen.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js';
import SecondLanguageControl from './SecondLanguageControl.js';
Expand Down Expand Up @@ -65,7 +65,7 @@ export default class NumberSuiteCommonPreferencesNode extends HBox {
/**
* Determines whether the sim is running with a screen of the specified type.
*/
public static hasScreenType( constructor: new ( ...args: IntentionalAny[] ) => Screen ): boolean {
public static hasScreenType( constructor: new ( ...args: IntentionalAny[] ) => AnyScreen ): boolean {
return ( _.find( phet.joist.sim.screens, screen => screen instanceof constructor ) !== undefined );
}
}
Expand Down

0 comments on commit 483ece9

Please sign in to comment.