Ever wonder what makes a room a bedroom? Often times, it's presumed it has to have a closet. That makes sense, but those who write the rules on this say you can add closets with portable cabinets, aka as wardrobes.
The answer is a window. Not any window, either, because it needs to be an escape exit, provide light, and ventilation. The window must meet size and placement requirements too detailed for here. The room itself also has detailed size requirements.
Your local jurisdictions may have their own overlay of these requirements, but now you know it has to have a window.