This is where the addGlobalNotification function comes in. If you read the linked Microsoft Docs page you will learn that this is for displaying the message bars at the page.
However, there is a clue in the parameter section, the description of the type attribute says: “type: Number. Defines the type of notification. Currently, only a value of 2 is supported, which displays a message bar at the top of the app.”
We get our toast notification!
Checking the various features of the addGlobalNotification function, most of them work the same as a toast notification, the showing/hiding of the close button, this is always displayed so you cannot create an un-dismissible notification. It will also follow the users Toast Notification Display Time setting, so will disappear automatically after about 8 or 80 seconds depending on what is set.
Unfortunately, as the description suggests this does not appear to be supported currently, however addGlobalNotification has only been in General Availability since May, so It will likely become available later in the year.