Al-Kāfi - Volume 1

Book 4, Chapter 48

The Imams (a.s) do have the knowledge of what was and will be, and that nothing is unknown to them (a.s)
6 Aḥadīth