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

[refactoring] Extract module trait so it can be extended/mocked #272

Merged
merged 1 commit into from
Jun 10, 2020
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 @@ -8,7 +8,10 @@ import scala.scalajs.js.annotation.JSImport

@js.native
@JSImport("module", JSImport.Namespace)
object Module extends js.Object {
object Module extends Module

@js.native
trait Module extends js.Object {
var builtinModules: js.Array[String] = js.native

@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
Expand Down
14 changes: 7 additions & 7 deletions app/nodejs-v14/src/main/scala/io/scalajs/nodejs/tls/Tls.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ trait Tls extends js.Object {

@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
def rootCertificates: js.Array[String] = js.native
}

/**
* TLS Singleton
*/
@js.native
@JSImport("tls", JSImport.Namespace)
object Tls extends Tls {
def DEFAULT_ECDH_CURVE: String = js.native

@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
Expand All @@ -46,3 +39,10 @@ object Tls extends Tls {
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
def DEFAULT_MIN_VERSION: String = js.native
}

/**
* TLS Singleton
*/
@js.native
@JSImport("tls", JSImport.Namespace)
object Tls extends Tls