A good question to ask.
There isn't no evidence that if you've had typhoid you're immune to future episodes of the disease.
Typhoid vaccination needs to be repeated every 3 years (depending on the brand used and local recommendations) for those at risk, as well as using good hygiene because the vaccination isn't 100% effective on its own.
There's more in depth info here: http://www.nathnac.org/travel/factsheets/typhoid_p... (if the link isn't live here, copy and paste it into your browser).
I hope that helps and happy travelling.