-
Environment detailsos: linux Issue descriptionDoes not workimport pty from "node-pty"
pty.spawn(/* ... */); // Error: spawn does not exist on type "undefined" Worksimport {spawn} from "node-pty";
spawn(/* ... */); // works Not sure if this is operator error and im doing something dumb, or maybe the (Since it compiles via typescript, but fails on runtime with undefined error, it might be a typescript declaration file issue) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You want to use |
Beta Was this translation helpful? Give feedback.
You want to use
import * as pty from 'node-pty';
as you want to import everything aspty
.import pty from "node-pty"
imports the default module which doesn't exist. I believe we're doing the right thing here as there's noexport default
in node-pty.d.ts.