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

Avoid RawOptions where options have its own class. #66

Merged
merged 1 commit into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.scalajs.nodejs.events.IEventEmitter

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

/**
* The child_process module provides the ability to spawn child processes in a manner that is similar,
Expand Down Expand Up @@ -41,7 +40,7 @@ trait ChildProcess extends IEventEmitter {
object ChildProcess extends scala.scalajs.js.Object {
def exec(
args: String,
options: ExecOptions | io.scalajs.RawOptions = js.native,
options: ExecOptions = js.native,
callback: js.Function3[
nodejs.Error,
Output,
Expand All @@ -53,7 +52,7 @@ object ChildProcess extends scala.scalajs.js.Object {
def execFile(
file: String,
args: js.Array[String] = js.native,
options: ExecOptions | io.scalajs.RawOptions = js.native,
options: ExecOptions = js.native,
callback: js.Function3[
nodejs.Error,
Output,
Expand All @@ -64,31 +63,31 @@ object ChildProcess extends scala.scalajs.js.Object {

def execSync(
command: String,
options: ExecOptions | io.scalajs.RawOptions = js.native
options: ExecOptions = js.native
): Output = js.native

def execFileSync(
file: String,
args: js.Array[String] = js.native,
options: ExecFileSyncOptions | io.scalajs.RawOptions = js.native
options: ExecFileSyncOptions = js.native
): Output = js.native

def fork(
modulePath: String,
args: js.Array[String] = js.native,
options: ForkOptions | io.scalajs.RawOptions = js.native
options: ForkOptions = js.native
): ChildProcess = js.native

def spawn(
command: String,
args: js.Array[String] = js.native,
options: SpawnOptions | io.scalajs.RawOptions = js.native
options: SpawnOptions = js.native
): ChildProcess = js.native

def spawnSync(
command: String,
args: js.Array[String] = js.native,
options: SpawnSyncOptions | io.scalajs.RawOptions = js.native
options: SpawnSyncOptions = js.native
): SpawnSyncResult = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package object child_process {
@inline
def execFuture(
command: String,
options: js.UndefOr[ExecOptions | io.scalajs.RawOptions] = js.undefined
options: js.UndefOr[ExecOptions] = js.undefined
): Future[(Output, Output)] = {
promiseWithError2[nodejs.Error, Output, Output](cp.exec(command, options.orNull, _))
}
Expand All @@ -29,7 +29,7 @@ package object child_process {
def execFileFuture(
file: String,
args: js.UndefOr[js.Array[String]] = js.undefined,
options: js.UndefOr[ExecOptions | io.scalajs.RawOptions] = js.undefined
options: js.UndefOr[ExecOptions] = js.undefined
): Future[(Output, Output)] = {
promiseWithError2[nodejs.Error, Output, Output](cp.execFile(file, args.orNull, options.orNull, _))
}
Expand Down