Skip to main content
ChildProcess.prototype.stdout - node__child_process.d.ts - Node documentation
property ChildProcess.prototype.stdout

Usage in Deno

```typescript import { ChildProcess } from "node:node__child_process.d.ts"; ```
A `Readable Stream` that represents the child process's `stdout`. If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, then this will be `null`. `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will refer to the same value. ```js import { spawn } from 'node:child_process'; const subprocess = spawn('ls'); subprocess.stdout.on('data', (data) => { console.log(`Received chunk ${data}`); }); ``` The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.

Type

Readable | null