If you’ve not changed the settings for the JS Scripting addon, this line is not necessary. Furthermore, for now you cannot use let or const in a UI rule because of the way OH reuses the script again on subsequent runs. The second time the rule runs you’ll get an error complaining that actions already exists.
I think the PushSafer example there is wrong. Or to be more precise, it’s for the old 1.x style PushSafer Action which are no longer supported in OH. You’ll want to use the standard way to get an Action provided by a Thing.
I think you’ll want to use:
val action = actions.thingActions("pushsafer", "pushsafer:pushsafer-account:account")
to get the actions for the PushSafer Thing with that Thing UID.
NOTE: You don’t want to overwrite the actions variable. It’s unfortunate that the binding authors use that variable name in their examples.
From there you can call the functions on action as illustrated in the binding docs.