You had {SceneryEvent} event specified as the event type. That caused problems with the type-checker in both number-play and counting common:
TS2345: Argument of type 'PaperNumberNode' is not assignable to parameter of type 'DraggableItem'.
Types of property 'startDrag' are incompatible.
Type '(event: PressListenerEvent) => void' is not assignable to type '(event: SceneryEvent) => void'.
Types of parameters 'event' and 'event' are incompatible.
Type 'SceneryEvent' is not assignable to type 'PressListenerEvent'.
Type 'Event' is not assignable to type 'PressListenerDOMEvent'.
Type 'Event' is missing the following properties from type 'KeyboardEvent': altKey, charCode, code, ctrlKey, and 17 more
That sounds good (conversion looks good). If we need more flexibility, ClosestDragListener could take a type parameter (but PressListenerEvent should work for our drag handlers).
@jonathanolson please review the TypeScript conversion of
ClosestDragListener
in https://github.com/phetsims/sun/commit/4a3affd5f709bb68a888fa3cdedfe3956127cd47.You had
{SceneryEvent} event
specified as the event type. That caused problems with the type-checker in both number-play and counting common:I had to change to
event: PressListenerEvent
.