find<D extends Destination> method
D?
find<D extends Destination>()
Find the closest ancestor with type D
, current is checked.
Useful to looking for data hold by parent destination.
Implementation
D? find<D extends Destination>() =>
current is D ? current as D : _stack?.find<D>();