Nnodejs

nodejs/err-invalid-callback

Handle DEP0159 by replacing ERR_INVALID_CALLBACK with ERR_INVALID_ARG_TYPE.

transformationmigrationerrorsDEP0159
Public
0 executions
Run locally
npx codemod @nodejs/err-invalid-callback
Documentation

DEP0159: ERR_INVALID_CALLBACK replaced by ERR_INVALID_ARG_TYPE

This recipe replaces references to the deprecated ERR_INVALID_CALLBACK error code with ERR_INVALID_ARG_TYPE.

See DEP0159.

Example

diff

Also handles deduplication when both codes were already checked:

diff

Ready to contribute?

Build your own codemod and share it with the community.