I originally had the following code:
const util = require('util');
const exec = util.promisify(require('child_process').exec);
But then I tried to refactor it like this:
import * as exec from 'child_process';
const execPromise = util.promisify(exec);
Now I am encountering the error
TypeError: The "original" argument must be of type function. Received an instance of Object
on the exec
in util.promisify
I'm not sure how to resolve this issue and make it work with the new import syntax for TypeScript, especially considering `@typescript-eslint/no-var-requires