Your listener id (must be unique)
Your listener function
// log a message in the console each time an extension will be unregistered
JMap.Event.Extension.on.beforeUnregistration(
"custom-core-extension-beforeUnregistration",
params => console.log(`Extension id="${params.extensionId}" will be unregistered`)
)
JMap.Event.Extension.on.beforeUnregistration
This event is triggered just before an extension will be unregistered.