File tree 3 files changed +12
-9
lines changed
3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ The full API for node-pty is contained within the [TypeScript declaration file](
18
18
## Example Usage
19
19
20
20
``` js
21
- var os = require ( ' os' ) ;
22
- var pty = require ( ' node-pty' ) ;
21
+ import * as os from ' node: os' ;
22
+ import * as pty from ' node-pty' ;
23
23
24
- var shell = os .platform () === ' win32' ? ' powershell.exe' : ' bash' ;
24
+ const shell = os .platform () === ' win32' ? ' powershell.exe' : ' bash' ;
25
25
26
- var ptyProcess = pty .spawn (shell, [], {
26
+ const ptyProcess = pty .spawn (shell, [], {
27
27
name: ' xterm-color' ,
28
28
cols: 80 ,
29
29
rows: 30 ,
Original file line number Diff line number Diff line change 1
- var os = require ( ' os') ;
2
- var pty = require ( '../..' ) ;
1
+ import * as os from 'node: os';
2
+ import * as pty from '../../lib/index.js' ;
3
3
4
- var isWindows = os . platform ( ) === 'win32' ;
5
- var shell = isWindows ? 'powershell.exe' : 'bash' ;
4
+ const isWindows = os . platform ( ) === 'win32' ;
5
+ const shell = isWindows ? 'powershell.exe' : 'bash' ;
6
6
7
- var ptyProcess = pty . spawn ( shell , [ ] , {
7
+ const ptyProcess = pty . spawn ( shell , [ ] , {
8
8
name : 'xterm-256color' ,
9
9
cols : 80 ,
10
10
rows : 26 ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "type" : " module"
3
+ }
You can’t perform that action at this time.
0 commit comments