My goal is to load a sublayer from my MapImageLayer into a FeatureTable so that the table will filter with the extent of the view.
My problem is that when I am querying for the sub layers I am not able to call things like allSublayers on the MapImageLayer because typescript says that it is a type esri.Layer rather than a MapImageLayer.
So something like this:
const foundLyr = webMap.layers.find((lyr) => lyr.type === 'map-image');
Does anyone know how to solve this?