Al-Kahf • EN-AL-JALALAYN
﴿ كَذَٰلِكَ وَقَدْ أَحَطْنَا بِمَا لَدَيْهِ خُبْرًۭا ﴾
“thus [We had made them, and thus he left them; and We did encompass with Our knowledge all that he had in mind”
So it was in other words the situation was as We have stated; and We encompassed whatever pertained to him that is what Dhū’l-Qarnayn possessed in the way of machinery men and otherwise in knowledge.