When the verse "When the help of Allah and the victory comes" [Nasr 110:1] was revealed, the Prophet ﷺ knew that his own death had been announced to him. So it was said, "When the help of Allah comes..." the entire surah [Nasr 110:1–3].
لما نزلت: {إذا جاء نصر الله والفتح} علم النبي ﷺ أنه قد نعيت إليه نفسه، فقيل: {إذا جاء نصر الله} السورة كلها.
Ahmad (3201) and Ibn Jareer in his Tafsir (24/709) both narrated it through the hadith of Sufyan Thawri, from Asim bin Abu Najud, from Abu Razeen, from Ibn Abbas, and he mentioned it. Its chain is hasan because of Asim, for his hadith is hasan.