diff --git a/js/imports.ts b/js/imports.ts index f4fcf63fe..695aa2c22 100644 --- a/js/imports.ts +++ b/js/imports.ts @@ -206,7 +206,7 @@ export { default as PDOMTree } from './accessibility/pdom/PDOMTree.js'; export { default as PDOMFuzzer } from './accessibility/pdom/PDOMFuzzer.js'; export type { default as TInputListener } from './input/TInputListener.js'; -export type { SceneryListenerFunction, SupportedEventTypes } from './input/TInputListener.js'; +export type { SceneryListenerFunction, SceneryNullableListenerFunction, SupportedEventTypes } from './input/TInputListener.js'; export { default as Pointer, Intent } from './input/Pointer.js'; export { default as Mouse } from './input/Mouse.js'; export { default as Touch } from './input/Touch.js'; diff --git a/js/input/TInputListener.ts b/js/input/TInputListener.ts index b9e5c26b9..dbafec043 100644 --- a/js/input/TInputListener.ts +++ b/js/input/TInputListener.ts @@ -13,6 +13,7 @@ import StrictOmit from '../../../phet-core/js/types/StrictOmit.js'; import { Hotkey, SceneryEvent } from '../imports.js'; export type SceneryListenerFunction = ( event: SceneryEvent ) => void; +export type SceneryNullableListenerFunction = ( event: SceneryEvent | null ) => void; type TInputListener = { interrupt?: () => void;