Foreshadowing is a literary device used by authors to hint at future events or outcomes in a work of literature.