pickFromRay not available in CesiumJS

I’d like to use pickFromRay for checking sparse visibility info in Cesium JS (is the center of an object visible in certain photos ?), but it seems the function is private, although available in Sandcastle.
How can I use this function in CesiumJS outside of sandcastle?

I’m using Cesium 1.102.0 with Typescript.