For example, in 1898, fourteen years prior to the Titanic disaster, Morgan Robertson wrote a book called . This story features an enormous British passenger liner called the Titan, which, deemed to be unsinkable, carries insufficient lifeboats. On a voyage in the month of April, the Titan hits an iceberg in the North Atlantic and sinks with the loss of almost everyone on board. Then, at the very time the Titanic sank, the 1 May 1912 issue of The Popular Magazine was on the news stands. It contained the short story "The White Ghost of Disaster," which described the collision of an ocean liner with an iceberg in the Atlantic Ocean and its subsequent sinking. The story, by Mayn Clew Garnett (the pseudonym of sea-story author T. Jenkins Hains), needless to say, created a minor sensation. There was more: In 1912, the German Berliner Tageblatt newspaper published a serialized novel written by Gerhard Hauptmann, (who would receive the Nobel Prize in Literature later that year), that ran from January 9 until April 24. One month before the fateful April maiden voyage of the RMS Titanic, the story was also published by S. Fischer Verlag as the novel Atlantis. Atlantis is a romantic tale set aboard the fictitious ocean liner Roland, which is coincidentally doomed to a fate very similar to that of the RMS Titanic. This literary foreshadowing of the Titanic disaster received considerable attention at the time.
Matthew thus offers a literary foreshadowing of events to come
“On every page, the text winks broadly at readers, first pointing to and then playing with conventions of folklore, narrative voice, literary foreshadowing, and plain old common sense.”
No better literary foreshadowing could ever have been laid out
The Oxford English Dictionary lists the verb use of the word telegraph first simply as the act of sending a telegram, the then goes on to offer the additional definition To give a clumsily obvious hint or premature indication of (something to come).  This use seems to most often refer to a physical act, but like the invention itself, the term straddles the domains of physical and cerebral. Only in the purely figurative sense is there no physical element, such as in the case of literary foreshadowing. The telegraph requires a physical infrastructure, as well as machines at either end of the line. The message itself undergoes several transformations from words to physical taps on the machine, then to electrical impulses, then to sounds in the telegraphs operators earpiece or ticks on paper, and then finally back into words. With some exceptions, this entire process is also at either end by telegraph operators who can the code. This can be represented as:
How to Use Literary Foreshadowing - Be a Better Writer