Typecasting happens quite quickly and is a very annoying situation for most composers or practically any creative person. Once you have a notable success in a genre or in a job, probably most follow-up jobs will be more or less of the same kind or in the same field. “I heard your fantastic horror movie score in XY, i’m shooting a horror movie, do you want to score it?” or offers like that happen quicker than you might imagine.
Some people feel very comfortable putting all their effort into one specific genre or style of writing, while many others get annoyed by this. Looking at the portfolio of some major Hollywood composers shows that even the big names aren’t safe from being typecast.
If you want to avoid that, you have to become active and sometimes accept jobs of a “new kind” even if they pay below your standard fee. Of course, financial reasons are often a major argument but the most important thing here is that if you want to avoid being typecast, you can’t stay passive with an attitude of “Oh well, I’m sure other projects will come.”
At a certain point, when you have a diverse portfolio, the hassle of working against the typecasting problem will be a little easier.