Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 609d336

Browse files
authored
Merge pull request #66 from exoego/timers
Avoid RawOptions where options have its own class.
2 parents 27d3aff + 8355ac6 commit 609d336

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

app/current/src/main/scala/io/scalajs/nodejs/child_process/ChildProcess.scala

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import io.scalajs.nodejs.events.IEventEmitter
66

77
import scala.scalajs.js
88
import scala.scalajs.js.annotation.JSImport
9-
import scala.scalajs.js.|
109

1110
/**
1211
* The child_process module provides the ability to spawn child processes in a manner that is similar,
@@ -41,7 +40,7 @@ trait ChildProcess extends IEventEmitter {
4140
object ChildProcess extends scala.scalajs.js.Object {
4241
def exec(
4342
args: String,
44-
options: ExecOptions | io.scalajs.RawOptions = js.native,
43+
options: ExecOptions = js.native,
4544
callback: js.Function3[
4645
nodejs.Error,
4746
Output,
@@ -53,7 +52,7 @@ object ChildProcess extends scala.scalajs.js.Object {
5352
def execFile(
5453
file: String,
5554
args: js.Array[String] = js.native,
56-
options: ExecOptions | io.scalajs.RawOptions = js.native,
55+
options: ExecOptions = js.native,
5756
callback: js.Function3[
5857
nodejs.Error,
5958
Output,
@@ -64,31 +63,31 @@ object ChildProcess extends scala.scalajs.js.Object {
6463

6564
def execSync(
6665
command: String,
67-
options: ExecOptions | io.scalajs.RawOptions = js.native
66+
options: ExecOptions = js.native
6867
): Output = js.native
6968

7069
def execFileSync(
7170
file: String,
7271
args: js.Array[String] = js.native,
73-
options: ExecFileSyncOptions | io.scalajs.RawOptions = js.native
72+
options: ExecFileSyncOptions = js.native
7473
): Output = js.native
7574

7675
def fork(
7776
modulePath: String,
7877
args: js.Array[String] = js.native,
79-
options: ForkOptions | io.scalajs.RawOptions = js.native
78+
options: ForkOptions = js.native
8079
): ChildProcess = js.native
8180

8281
def spawn(
8382
command: String,
8483
args: js.Array[String] = js.native,
85-
options: SpawnOptions | io.scalajs.RawOptions = js.native
84+
options: SpawnOptions = js.native
8685
): ChildProcess = js.native
8786

8887
def spawnSync(
8988
command: String,
9089
args: js.Array[String] = js.native,
91-
options: SpawnSyncOptions | io.scalajs.RawOptions = js.native
90+
options: SpawnSyncOptions = js.native
9291
): SpawnSyncResult = js.native
9392

9493
}

app/current/src/main/scala/io/scalajs/nodejs/child_process/package.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package object child_process {
2020
@inline
2121
def execFuture(
2222
command: String,
23-
options: js.UndefOr[ExecOptions | io.scalajs.RawOptions] = js.undefined
23+
options: js.UndefOr[ExecOptions] = js.undefined
2424
): Future[(Output, Output)] = {
2525
promiseWithError2[nodejs.Error, Output, Output](cp.exec(command, options.orNull, _))
2626
}
@@ -29,7 +29,7 @@ package object child_process {
2929
def execFileFuture(
3030
file: String,
3131
args: js.UndefOr[js.Array[String]] = js.undefined,
32-
options: js.UndefOr[ExecOptions | io.scalajs.RawOptions] = js.undefined
32+
options: js.UndefOr[ExecOptions] = js.undefined
3333
): Future[(Output, Output)] = {
3434
promiseWithError2[nodejs.Error, Output, Output](cp.execFile(file, args.orNull, options.orNull, _))
3535
}

0 commit comments

Comments
 (0)