-
-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Description
Very odd issue related to using a node: style import and using typeof of something imported.
In this case its from child_process, but I suspect it would happen for other built-in modules too.
import { execSync } from 'node:child_process'; // DOES NOT WORK
// import { execSync } from 'child_process'; // WORKS
export function execHelper(
command: string,
opts?: Parameters<typeof execSync>[1] // <- this `typeof execSync` causes the issue
) {
// ... some extra logic
return execSync(command, opts);
}
Repro here - https://stackblitz.com/edit/child-process-ts-issue?file=README.md
Metadata
Metadata
Assignees
Labels
No labels