pub fn get_object_by_id_typed<T>(id: &ObjectId<T>) -> Option<T>
where T: MaybeHasId + JsCast,
Expand description

Get the typed object represented by a given ObjectId, if it’s still alive and visible.

Screeps documentation