Modal promises

How do you use the promises with the hide and show functions? I’ve tried

  console.log("Modal finished closing");

but I get TypeError: Cannot call method 'then' of undefined


I think this feature actually got added a day or so after the beta was released:

Methinks the docs are ahead of the current beta release in this case.