The getEntities() method of Dimension doesn't seem to be recognized, and gives an error in the output. I include the manifest.json file used just in case.
Minimal reproduction example (main.js):
import * as MC from "mojang-minecraft";
let dimension = MC.world.getDimension("overworld");
let anything = dimension.getEntities();
Output:
[media]
Fixed in 1.18.10.24 Beta