The ending of Doctor Sleep is bittersweet, offering closure while leaving a lingering sense of loss.
Dan Torrance, the protagonist, confronts Rose the Hat and her cult, The True Knot, who feed on the "shine" of children with psychic abilities. In a climactic battle, Dan uses his powers to protect Abra Stone, a young girl with a powerful shine, and defeat the True Knot.
Dan emerges victorious, but the victory comes at a cost. He sacrifices himself to ensure Abra's safety, ensuring the remaining members of the True Knot are unable to harm her.
The novel ends with Abra reflecting on Dan's sacrifice and vowing to use her powers for good, carrying on his legacy and protecting others like him.
The ending emphasizes the themes of sacrifice, redemption, and the enduring power of hope. While Dan's death is a tragedy, his actions ultimately secure a future for Abra and ensure that the True Knot's reign of terror comes to an end.