The way in which this excellent short story ends allows intense dramatic irony to come into play. Let us just remind ourselves that, having been told that her husband perished in an accident, Mrs. Mallard, although at first grief-stricken, actually comes to feel intensely liberated at the thought of the freedom that she know has. However, the story ends as her husband enters the house. We already know that Mrs. Mallard had a weak heart, and at the end of the story she dies. However, note the way that the others conclude that she died:
When the doctors came they said she had died of heart disease--of joy that kills.
The way that the story ends, even though it does not give us the thoughts of Mrs. Mallard herself, is so effective because of the irony in this final line. It is assumed that Mrs. Mallard died through the joy of seeing her husband again, when we know as readers that actually it was the thought of the return to the oppression of her former married life that resulted in her death. Having experienced and sweetly savoured such freedom only to have it cruelly ripped away from her once again was intolerable for her, and she died at the thought.