From 483ece96a84e3bb406c7d70ca8012e756e3d2997 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Mon, 1 May 2023 09:45:55 -0600 Subject: [PATCH] Make Screen type parameters required, and introduce AnyScreen, see https://github.com/phetsims/joist/issues/886 --- js/common/view/NumberSuiteCommonPreferencesNode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/common/view/NumberSuiteCommonPreferencesNode.ts b/js/common/view/NumberSuiteCommonPreferencesNode.ts index 565bd21..3682b29 100644 --- a/js/common/view/NumberSuiteCommonPreferencesNode.ts +++ b/js/common/view/NumberSuiteCommonPreferencesNode.ts @@ -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'; @@ -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 ); } }