method ILifecycleApi.onClose ILifecycleApi.onClose(fn: () => void | Promise<void>): void Runs after shutdown completes. Parameters fn: () => void | Promise<void> Hook body Return Type void