Ayesha reported,

The Messenger of Allah ﷺ, while in good health, used to say that no prophet is ever taken in death until he is shown his place in Paradise, then given the choice to live or to depart.When he fell ill and the moment of his death drew near, his head was resting on Ayesha's thigh. He lost consciousness, and when he came to, he fixed his gaze toward the ceiling of the house and said, "Allah, with the highest companions."Ayesha said, "Then he will not remain with us." And I knew this was the very thing he had been telling us about while he was in good health.

Bukhari 4437

Sahih

حدثنا أبو اليمان أخبرنا شعيب عن الزهري قال أخبرني عروة بن الزبير إن

عائشة قالت

كان رسول الله ﷺ وهو صحيح يقول إنه لم يقبض نبي قط حتى يرى مقعده من الجنة ثم يحيا أو يخير فلما اشتكى وحضره القبض ورأسه على فخذ عائشة غشي عليه فلما أفاق شخص بصره نحو سقف البيت ثم قال اللهم في الرفيق الأعلى فقلت إذا لا يجاورنا فعرفت أنه حديثه الذي كان يحدثنا وهو صحيح

البخاري 4437صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Illness of the Prophet ﷺ and his death
Numbering
Darussalam 4437
Bukhari 4437