A legal bedroom requires two methods to enter or exit the room. A door and a window usually meet this standard. But you could also have a door and a skylight (assuming the skylight is accessible) or an internal door plus an external door.
Although you may find a workaround, it’s still highly recommended that you have at least one window in your bedroom. They’re essential for ventilation and natural light.