...a special kind of symbolism. (A symbol is something which represents something else.) We can define a type as a “prophetic symbol” because all types are representations of something yet future. More specifically, a type in scripture is a person or thing in the Old Testament which foreshadows a person or thing in the New Testament. For example, the flood of Noah’s day (Genesis 6-7) is used as a type of baptism in 1 Peter 3:20-21. The word for type that Peter uses is figure.Another example of a type is in Hebrews 9:8-9: "the first tabernacle . . . which was a figure for the time then present." The blood sacrifices of lambs prefigured or was a type of the actual sacrifice of the Lamb of God. And so on.
Ligonier defines typology as
Typology is based on the fact that God works in recurring patterns throughout history and says that a past event or person can prefigure or serve as a type of a future person or event.Joseph, son of Jacob, is in many respects one of the strongest types depicting the Savior. At our church we are going through Genesis and the latter portion of all the books of Genesis detail Joseph's story. Sold into slavery, descended into the pit (jail), Joseph interpreted the Cupbearer's and Baker's dreams and said to them as they were called to Pharaoh's side, "Remember me". Joseph was forgotten, ... until the Cupbearer heard that Pharaoh needed someone to interpret Pharaoh's dream. Joseph was called to the King's side-
Then Pharaoh sent and called Joseph, and they quickly brought him out of the pit. And when he had shaved himself and changed his clothes, he came in before Pharaoh. (Genesis 41:14)
And Pharaoh said to Joseph, "See, I have set you over all the land of Egypt." Then Pharaoh took his signet ring from his hand and put it on Joseph’s hand, and clothed him in garments of fine linen and put a gold chain about his neck. And he made him ride in his second chariot. And they called out before him, "Bow the knee!" Thus he set him over all the land of Egypt. Moreover, Pharaoh said to Joseph, "I am Pharaoh, and without your consent no one shall lift up hand or foot in all the land of Egypt." (Genesis 41:41-44).
When all the land of Egypt was famished, the people cried to Pharaoh for bread. Pharaoh said to all the Egyptians, "Go to Joseph. What he says to you, do." (Genesis 41:55)
Moreover, all the earth came to Egypt to Joseph to buy grain, because the famine was severe over all the earth. (Genesis 41:57)
Hopefully you notice the similarities. Joseph was reviled, sold as a slave, they put an iron fetter around his neck. (Psalm 105:17-18). He was in the pit, forgotten and ignored. One day in a moment, a twinkling, he was exalted and put in second place, only the King was higher than he. He rode in the second chariot. He was given a fine garment and his iron collar replaced with a chain of gold. All were told to bow the knee to Joseph, just as they will bow the knee to Jesus (Romans 14:11, Philippians 2:10). Joseph saved all in the land, all the earth.
The almost exact language was used by Pharaoh about Joseph as Mary had stated at the Wedding at Cana.
"Then Pharaoh told all the Egyptians, "Go to Joseph and do what he tells you." (Genesis 41:55 NIV)
His mother said to the servants, "Do whatever he tells you." (John 2:5).
Of course, typology only goes so far. Joseph gave grain (bread) to the people to save their life, but Jesus IS the bread of life. However, it's interesting to note types as you read along to note types as you read along to think more deeply about what God is showing us through His word. Here are some further resources for you on typology.
Ligonier: Typology vs. Allegory.
GTY: Melchizedek, a Type of Christ