Chris - assuming you asking this question as a newbie to handguns, then the answer is a revolver. That is because you wouldn't ask if you were experienced with them, in particular a semi-auto.
It is difficult enough for a new-ish shooter to deal with the adrenaline-squared reaction to a life-threatening situation. Your primary need is reliability. Think of an analogy in flashlights: one is none, two is one. A shrouded-hammer double-action revolver will fire if you pull the trigger, and if it doesn't, it will fire when you pull the trigger again.
A semi-auto is almost as reliable IF and ONLY IF you have a cartridge chambered. Many, many semi-auto owners are chicken to keep chambered-cartridge semi-autos at the ready. It's true and often for good reason, such as little kids being in the house. But in that circumstance, adrenaline-squared can = pulling the trigger on an empty chamber in a semi-auto, a Wile-E-Coyote moment that can end your life.
Once you consider yourself "gun savvy," and I don't mean that in a macho-challenging sense - more like a 10-handicap guy in golf, then go for the semi-auto. My antiquated but Army-taught rule of thumb is, if you can't disassemble and reassemble your 1911 (semi-auto) in pitch-black darkness, then you are not expert in its handling and use.
If you are protecting yourself and/or your family, ditch all ego issues (not that you mentioned any). Go to a range, rent guns, practice and find what feels and shoots best, feel comfortable that you can repeat most of that in the dark (not including field-stripping), and then you have found a proper self-defense gun.
If I were Johnny Carson as Karnak, I'd see a revolver in your immediate future, followed by a semi-auto later on.