
org.scalajs.nodejs.repl.REPL.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalajs-nodejs-repl_sjs0.6_2.11 Show documentation
Show all versions of scalajs-nodejs-repl_sjs0.6_2.11 Show documentation
NodeJS/repl binding for Scala.js
The newest version!
package org.scalajs.nodejs
package repl
import org.scalajs.nodejs.events.EventEmitter
import org.scalajs.nodejs.net.Socket
import scala.scalajs.js
import scala.scalajs.js.|
/**
* NodeJS REPL module
* @author [email protected]
*/
@js.native
trait REPL extends NodeModule with EventEmitter {
var REPL_MODE_SLOPPY: String = js.native
var REPL_MODE_STRICT: String = js.native
var REPL_MODE_MAGIC: String = js.native
/**
* @example repl.start([options])
*/
def start(options: REPLOptions | NodeOptions): REPLServer = js.native
/**
* @example repl.start([options])
*/
def start(prompt: String, socket: Socket): REPLServer = js.native
/**
* @example repl.start([options])
*/
def start(prompt: String): REPLServer = js.native
/**
* @example repl.start([options])
*/
def start(): REPLServer = js.native
}
/**
* REPL Companion
* @author [email protected]
*/
object REPL {
/**
* Convenience method for retrieving the repl module
* @param require the implicit [[NodeRequire require function]]
* @return the REPL instance
*/
def apply()(implicit require: NodeRequire) = require[REPL]("repl")
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy