This answer assumes that "typo" refers to "one-off typing mistake that doesn't end up becoming relevant to a wide audience (e.g. because the typo appears to be such a specific gotcha that lots of people unwittingly fall into that same trap)", which, incidentally, is when the so-called "typo" close reason does not apply, because the real purpose of that close reason is not to remove questions about typos, but to remove questions that can and should be forgotten about.
Technically, you could point out in an answer that the problem is due to a typo, the asker could acknowledge it as a boo-boo on their part, and then the question could be closed as a typo. I have a pet name for this type of closure: a "retroactive closure", because the close reason only becomes apparent after the question has been answered.
But the entire point of closing such questions is that they are no longer relevant after the mistake has been discovered and corrected. It's a one-off mistake that can be swept under the rug and forgotten about. So answering such questions is counter-productive for two reasons:
- Once the answer receives an upvote, the asker is prevented from deleting their own question after acknowledging that they messed up, thereby subjecting the question to downvotes for all kinds of reasons as long as it remains around.
- Once the question is deleted by vote, Roomba, etc, assuming it doesn't take 60 whole days for that to happen the asker ends up forfeiting any rep they might have gained or lost from answering the question.
Instead, you should generally treat the act of pointing out a typo in a question as a request for clarification, rather than an attempt at answering. A typo can either be
- a mistake made during the time of posting that changes the meaning of the question, and is not consequential to the problem that prompted the question to begin with, or
- the actual problem that prompted the question to begin with.
Even if, like me sometimes, you're sure that the typo was #2, this is one of those times where I'd say it's perfectly acceptable to violate the "don't post answers as comments" rule and just leave a comment. That way you make it easier to close and remove the question so everyone can forget about it and move on to the next, actually pressing, problem.
If someone has posted an answer, don't sweat it. Certainly don't fixate so much on the answer that you forget about the question. Just let the answerer know that the question is going to be closed (or is closed) and there's a good chance their answer is going to go away if the question is eventually removed.