Commit 81a1e7d

Anton Medvedev <anton@medv.io>
2021-05-24 21:23:51
Update README.md
1 parent 5b0a0cd
Changed files (1)
README.md
@@ -112,9 +112,9 @@ Read more about [pipelines](examples/pipelines.md).
 
 ```ts
 class ProcessOutput {
-  readonly exitCode: number
   readonly stdout: string
   readonly stderr: string
+  readonly exitCode: number
   toString(): string
 }
 ```
@@ -178,7 +178,7 @@ await sleep(1000)
 Changes behavior of `$` to not throw an exception on non-zero exit codes.
 
 ```ts
-function nothrow(p: ProcessPromise<ProcessOutput>): ProcessPromise<ProcessOutput>
+function nothrow<P>(p: P): P
 ```
 
 Usage:
@@ -196,9 +196,15 @@ await $`find ./examples -type f -print0`
 If only the `exitCode` is needed, you can use the next code instead:
 
 ```js
-if (await $`[[ -d path ]]`.exitCode == 0) {...}
+if (await $`[[ -d path ]]`.exitCode == 0) {
+  ...
+}
+
 // Equivalent of:
-if ((await nothrow($`[[ -d path ]]`)).exitCode == 0) {...}
+
+if ((await nothrow($`[[ -d path ]]`)).exitCode == 0) {
+  ...
+}
 ```
 
 ### `chalk` package