Since the topic of allegory and typology has arisen, it’s necessary to define our terms. Allegory is a hermeneutical method which asserts that a text denotes something other than, or above and beyond, its literal referents.
It may regard the allegorical meaning as addition to the literal meaning. Or the allegorical meaning may be the “true” meaning.
For example, the allegorical interpretation of Canticles takes this book to be, not a set of love poems about a man and a woman, but an extended metaphor for Yahweh’s relation to Israel, or Christ’s relation to the Church.
By contrast, typology is not, properly speaking, a hermeneutical method. We make speak of typological interpretation, as a shorthand expression, yet typology is not fundamentally about the significance of a text, but about the significance of person, place, institution, or event. (I’ll say “event” for short.)
It presupposes a Biblical philosophy of history, according to which God has orchestrated history such that certain earlier events foreshadow certain later events. So typology is rooted in things rather than words. It's a way of interpreting history.
Typology may take a text as a reference point because the text supplies a record of the event. So typology will refer to the event via the textual witness to that event.
But it’s not fundamentally about the meaning of the text. And it doesn’t set aside the historical context of the passage. Indeed, it presupposes the historical context of the passage as a necessary relatum. For typology asserts a parallel between one historical event and another. Both relata must be historical for the analogue to obtain.