It is written, "And Miriam the prophetess, the sister of Aaron, took" (Exodus 15:20) - and not "the sister of Moses." This teaches that she was prophesying while she was still only the sister of Aaron, and she said: My mother is destined to bear a son who will save Israel. At the hour Moses was born, the whole house was filled with light. Her father arose and kissed her on her head; he said to her, My daughter, your prophecy has been fulfilled. But when they cast him into the river, [her father arose] and tapped her on her head and said to her, Where now is your prophecy? This is the meaning of what is written, "And his sister stood at a distance" (Exodus 2:4) - to know what would be the end of her prophecy.
Miriam Prophesies That Her Mother Will Bear Israel's Savior
Yalkut Shimoni on Torah 166:4
(שמות ב ד) כְּתִיב "וַתִּקַּח מִרְיָם הַנְּבִיאָה אֲחוֹת אַהֲרֹן", וְלֹא אֲחוֹת מֹשֶׁה, מְלַמֵּד שֶׁהָיְתָה מִתְנַבְּאָה כְּשֶׁהִיא אֲחוֹת אַהֲרֹן, וְאָמְרָה עֲתִידָה אִמִּי שֶׁתֵּלֵד בֵּן שֶׁהוּא מוֹשִׁיעַ אֶת יִשְׂרָאֵל. בְּשָׁעָה שֶנּוֹלַד מֹשֶׁה נִתְמַלֵּא כָּל הַבַּיִת אוֹרָה, עָמַד אָבִיהָ וּנְשָׁקָהּ עַל רֹאשָׁהּ, אָמַר לָהּ, בִּתִּי נִתְקַיְּמָה נְבוּאָתֵךְ. כְּשֶׁהִטִּילֻהוּ לַיָּם [עָמַד אָבִיהָ] וְטָפַח לָהּ עַל רֹאשָׁהּ, אָמַר לָהּ הֵיכָן נְבוּאָתֵךְ, הַיְינוּ דִּכְתִיב וַתֵּתַצַּב אֲחוֹתוֹ, לֵידַע מַה יְּהֵא בְּסוֹף נְבוּאָתָהּ.