Altafsir.com - The Tafsirs - التفاسير
 

* تفسير Kashani Tafsir

{ وَكَذٰلِكَ يَجْتَبِيكَ رَبُّكَ وَيُعَلِّمُكَ مِن تَأْوِيلِ ٱلأَحَادِيثِ وَيُتِمُّ نِعْمَتَهُ عَلَيْكَ وَعَلَىٰ ءَالِ يَعْقُوبَ كَمَآ أَتَمَّهَآ عَلَىٰ أَبَوَيْكَ مِن قَبْلُ إِبْرَاهِيمَ وَإِسْحَاقَ إِنَّ رَبَّكَ عَلِيمٌ حَكِيمٌ }

Thus, will your Lord prefer you: that is, just like that election, by granting [Joseph] that tremendous vision, so He elects you [O Muḥammad] for prophethood, for truthful visions, especially the like of these, are the prelude to prophethood, and so he came to understand from his vision that he is one of the beloved [of God] for whom unveilings precede their wayfaring; and perfect His grace upon you, of prophethood and kingship.