Hebrews 11:6–7 (KJV), mentions Noah being warned by God of the Flood.
Hebrews 11:6–7, New Testament, The Church of Jesus Christ of Latter-Day Saints, accessed March 17, 2022
6 But without faith it is impossible to please him: for he that cometh to God must believe that he is, and that he is a rewarder of them that diligently seek him.
7 By faith Noah, being warned of God of things not seen as yet, moved with fear, prepared an ark to the saving of his house; by the which he condemned the world, and became heir of the righteousness which is by faith.