NodeSettings.onClose property

Called when the Node closes.

This may be by request, because the node naturally exits or an error has occurred. See onError to be notified of errors which may lead to the node closing.

Signature:

onClose?: (() => Promise<void>) | (() => void);