In Rudyard Kipling's short story "Rikki-Tikki-Tavi," Darzee the tailor-bird believes that Rikki has doomed himself to certain death by following Nagaina into her hole and even begins to compose a death lament for the brave, reckless mongoose. If Rikki had actually been killed by the cobra, the story would certainly have a very different effect on the reader and would not belong in The Jungle Book. As it stands, "Rikki-Tikki-Tavi" is a miniature epic, with the hero defending his people more effectively than most epic heroes have managed to do. Rikki's death would change the genre of the story, making it a tragedy.
Of the numerous possibilities for ending the story after Rikki's death, two seem particularly fitting and in line with the new tragic tone of the story. There could be an epilogue or continuation in which the garden becomes overrun with snakes and Nagaina reestablishes herself as its queen, forcing the family to leave the bungalow. Alternatively, the tragedy could become a revenge tragedy. Since Darzee and Chuchundra are clearly not suited to the task of fighting Nagaina, it would fall to the English family in the bungalow to avenge Rikki's death. Perhaps after Teddy's close call, they might even enlist outside help from some army unit with expertise in dealing with poisonous snakes.