import * as Evented from "dojo/Evented"; interface DoorEvents { open: { authorized: boolean } close: void } const door = new Evented(); door.on("open", evt => evt.authorized); door.on("location-change", (x,y,z) => x+y+z); door.emit("open", { authorized: false }); door.emit("close"); door.emit("location-change");