diff --git a/lib/internal/process/next_tick.js b/lib/internal/process/next_tick.js index e41064104e0c3e..418f4ff8816d3f 100644 --- a/lib/internal/process/next_tick.js +++ b/lib/internal/process/next_tick.js @@ -295,7 +295,7 @@ function setupNextTick() { // about to exit since the callback would not have a chance to be executed. function internalNextTick(triggerAsyncId, callback) { if (typeof callback !== 'function') - throw new TypeError('callback is not a function'); + throw new errors.TypeError('ERR_INVALID_CALLBACK'); // CHECK(Number.isSafeInteger(triggerAsyncId) || triggerAsyncId === null) // CHECK(triggerAsyncId > 0 || triggerAsyncId === null)