promiseHooks.onAfter(after)


    The after hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.

    import { promiseHooks } from 'node:v8';
    
    const stop = promiseHooks.onAfter((promise) => {});const { promiseHooks } = require('node:v8');
    
    const stop = promiseHooks.onAfter((promise) => {});