|
1 | 1 | package io.scalajs.nodejs.process
|
2 | 2 |
|
3 |
| -import com.thoughtworks.{enableIf, enableMembersIf} |
| 3 | +import com.thoughtworks.{ enableIf, enableMembersIf } |
4 | 4 | import io.scalajs.nodejs.events.IEventEmitter
|
5 |
| -import io.scalajs.nodejs.tty.{ReadStream, WriteStream} |
| 5 | +import io.scalajs.nodejs.tty.{ ReadStream, WriteStream } |
6 | 6 |
|
7 | 7 | import scala.scalajs.js
|
8 |
| -import scala.scalajs.js.annotation.JSGlobal |
| 8 | +import scala.scalajs.js.annotation.{ JSBracketAccess, JSGlobal } |
9 | 9 | import scala.scalajs.js.|
|
10 | 10 |
|
11 | 11 | /**
|
@@ -82,10 +82,7 @@ trait Process extends IEventEmitter {
|
82 | 82 | */
|
83 | 83 | def exitCode: Int = js.native
|
84 | 84 |
|
85 |
| - /** |
86 |
| - * TODO find documentation for this property |
87 |
| - */ |
88 |
| - def features: js.Dictionary[Boolean] = js.native |
| 85 | + def features: Features = js.native |
89 | 86 |
|
90 | 87 | /**
|
91 | 88 | * Alternate way to retrieve require.main. The difference is that if the main module changes at runtime,
|
@@ -481,3 +478,24 @@ trait ResourceUsage extends js.Object {
|
481 | 478 | var voluntaryContextSwitches: Int = js.native
|
482 | 479 | var involuntaryContextSwitches: Int = js.native
|
483 | 480 | }
|
| 481 | + |
| 482 | +@js.native |
| 483 | +trait Features extends js.Object { |
| 484 | + @deprecated("Use named members", "v0.10.0") |
| 485 | + @JSBracketAccess |
| 486 | + def apply(key: String): Boolean = js.native |
| 487 | + |
| 488 | + val debug: Boolean = js.native |
| 489 | + val uv: Boolean = js.native |
| 490 | + val ipv6: Boolean = js.native |
| 491 | + val tls_alpn: Boolean = js.native |
| 492 | + val tls_sni: Boolean = js.native |
| 493 | + val tls_ocsp: Boolean = js.native |
| 494 | + val tls: Boolean = js.native |
| 495 | + |
| 496 | + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) |
| 497 | + val inspector: Boolean = js.native |
| 498 | + |
| 499 | + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) |
| 500 | + val cached_builtins: Boolean = js.native |
| 501 | +} |
0 commit comments