Skip to content
Advertisement

The “original” argument must be of type function. Received an instance of Object

I used to have this:

JavaScript

Then I refactored to this (or at least my attempt to here):

JavaScript

Now I am getting the error TypeError: The "original" argument must be of type function. Received an instance of Object on the exec in util.promisify

Not sure how to quite get this working like it was but with this new import syntax for Typescript (specifically related to `@typescript-eslint/no-var-requires

Advertisement

Answer

You’re looking for

JavaScript

The * as exec did import the whole child_process module into a module namespace object.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement