nodejs_interop.node library

Support for interoperating with Node.js APIs.

Classes

AddressRecord
Represents an IPv4 (A record) or IPv6 (AAAA record) address.
AssertionErrorOptions
The context of an assertion error.
AssertModule
The assert module.
Buffer
An octet stream of binary data.
BufferConstants
Provides constants for the buffer module.
BufferEncoding
The character encodings currently supported by Node.js.
BufferModule
The buffer module.
ChildProcess
Represents a spawned child process.
ChildProcessModule
The child_process module.
ClusterModule
The cluster module.
ClusterSettings
Provides the settings of a cluster.
Console
A simple logger with configurable output streams.
ContextOptions
Options used to customize the compilation of JavaScript code.
Cpu
Information about a CPU core.
CpuTimes
The time usage of a CPU core.
CpuUsage
The CPU time usage of a process.
CreateStreamOptions
Options used to customize the creation of a file stream.
DecodeOptions
Options used to customize the text decoding.
DnsModule
The dns module.
DnsRecord
The common super class for DNS records.
Duplex<T>
A stream that implements both the Readable and Writable interfaces.
DuplexOptions
Options passed to duplex streams.
EmitWarningOptions
Provides options for emitting a process warning.
EncodingOptions
Options used to interpret the character encoding of strings.
EventEmitter
An object (called "emitter") periodically emitting named events that cause registered functions ("listeners") to be called.
FormatOptions
Provides options for serializing a URL object into a string.
FSConstants
Commonly used constants for file system operations.
FSModule
The fs module.
FSReadStream<T>
A Readable file stream returned by the FSModule.createReadStream method.
FSWatcher
Watches for changes of a file system entity.
FSWriteStream<T>
A Writable file stream returned by the FSModule.createWriteStream method.
HttpModule
The http module.
HttpServer
A TCP or IPC server.
InspectFunction
Inspects objects by returning a string representation that is primarily useful for debugging.
InspectOptions
Options used to alter certain aspects of a formatted string.
IPAddress
An internet address returned by a DNS lookup.
LookupOptions
Options used to customize a DNS lookup.
MemoryUsage
The memory usage of a process.
Module
The Module class representing a JavaScript module.
ModuleModule
The module module.
MXRecord
Represents a mail exchanger record (MX record).
NameRecord
Represents a hostname record (CNAME, NS or PTR record).
NaptrRecord
Represents a naming authority pointer (NAPTR record).
NetModule
The net module.
NetServer
A TCP or IPC server.
NetworkAddress
Describes a network address assigned to a network interface.
OSConstants
Commonly used operating system specific constants for error codes, process signals, and so on.
OSDlopenConstants
Provides the dlopen constants.
OSErrorConstants
Provides the error constants.
OSModule
The os module.
OSSignalConstants
Provides the signal constants.
ParseOptions
Provides options for parsing a URL query string.
PassThrough<T>
A trivial implementation of a Transform stream that simply passes the input bytes across to the output.
PathModule
The path module.
PathObject
An object whose properties represent significant elements of a path.
PipeOptions
Options used to customize the way a Readable stream is piped into a Writable stream.
Process
Provides information about, and control over, the current Node.js process.
PromisifyFunction
Promisifies functions by returning a version that returns Promises.
QueryStringModule
The querystring module.
Readable<T>
A readable stream is an abstraction for a source from which data is consumed.
ReadableOptions
Options passed to readable streams.
ReadFileOptions
Options used to customize the file reading.
Release
Provides information about a Node.js release.
RequireFunction
Requires modules.
ResolveFunction
Looks up the location of a module.
ResolveFunctionOptions
Options used to customize the resolution of a module's path.
ResolveOptions
Options used to customize the resolution of a hostname.
Resolver
An independent resolver for DNS requests.
ResourceRecordType
Defines the type of a DNS resource record.
Script
Represents a precompiled script that can be executed in specific sandboxes (or "contexts").
ScriptOptions
Options used to customize the compilation of JavaScript code.
SendOptions
Options used to customize the sending of a message via an IPC channel.
ServerOptions
Options used to customize the creation of a NetServer.
ServerResponse
An HTTP response, which returns the headers and data from the server to the client in response to an HTTP request.
SoaRecord
Represents a start of authority record (SOA record).
Socket
A TCP socket or a streaming IPC endpoint.
SocketAddress
An endpoint to which a socket is connected.
SocketOptions
Options used to customize the creation of a Socket.
SpawnOptions
Options used to customize the spawning of a child process.
SpawnResult
Represents the result of spawning a child process.
SrvRecord
Represents a service locator (SRV record).
Stats
Represents the result of calling the POSIX stat function on a file system entity. It is an immutable object, representing the snapshotted values returned by the stat() call.
StringDecoder
Decodes Uint8List objects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 characters.
StringifyOptions
Provides options for serializing an object into a URL query string.
TextDecoder
Takes a stream of bytes as input and emits a stream of code points.
TextDecoderOptions
Options passed to text decoders.
TextEncoder
Takes a stream of code points as input and emits a stream of bytes. All instances of TextEncoder only support UTF-8 encoding.
Transform<T>
A Duplex stream where the output is in some way related to the input.
TransformOptions
Options passed to transform streams.
TtyModule
The tty module.
TtyReadStream
A Socket that represents the readable side of a TTY. In normal circumstances process.stdin will be the only TtyReadStream instance in a Node.js process and there should be no reason to create additional instances.
TtyWriteStream
A Socket that represents the writable side of a TTY. In normal circumstances, process.stdout and process.stderr will be the only TtyWriteStream instances created for a Node.js process and there should be no reason to create additional instances.
TxtRecord
Represents a text query (TXT record).
Url
Represents a URL.
UrlModule
The url module.
UrlObject
An object whose properties represent significant elements of a URL.
UrlSearchParams
Defines utility methods to work with the query string of a URL.
UserInfo
Information about a user.
UtilModule
The util module.
VMModule
The vm module.
WatchFileOptions
Options used to customize a file watcher.
WatchOptions
Options used to customize a file system entity watcher.
Worker
Contains all public information and methods about a worker. [...]
Writable<T>
A writable stream is an abstraction for a destination to which data is written.
WritableOptions
Options passed to writable streams.
WriteFileOptions
Options used to customize the file writing.

Properties

console Console
The console object. Used to print to stdout and stderr.
@JS('console'), read-only
dirname String
The directory path of the current module.
@JS('__dirname'), read-only
exports → dynamic
A reference to the module.exports property that is shorter to type.
@JS('exports'), read-only
filename String
The file path of the current module. This is the resolved absolute path of the current module file.
@JS('__filename'), read-only
global → dynamic
The global namespace object.
@JS('global'), read-only
module Module
A reference to the current module.
@JS('module'), read-only
process Process
The process object.
@JS('process'), read-only
require RequireFunction
Requires modules.
@JS('require'), read-only

Functions

asStream<T>(Readable<T> readable) Stream<T>
Converts the specified readable stream to a Stream.
loadLibrary<T>(String identifier, { T onError(String identifier) }) → T
Requires the JavaScript module with the specified identifier. [...]

Typedefs

CompletionCallback0([JSError error ]) → void
A function invoked when an operation is finally completed.
CompletionCallback1<T>(JSError error, [ T value ]) → void
A function invoked with a value when an operation is finally completed.
CompletionCallback2<T1, T2>(JSError error, [ T1 value1, T2 value2 ]) → void
A function invoked with two values when an operation is finally completed.
LoggingFunction(dynamic data, [ Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7 ]) → void
Interface defining a logging function.

Exceptions / Errors

JSAssertionError
Indicates the failure of an assertion. Such errors commonly indicate inequality of actual and expected value.
SystemError
Indicates that an exception occurred within the program's runtime environment. Typically, these are operational errors that occur when an application violates an operating system constraint such as attempting to read a file that does not exist or when the user does not have sufficient permissions.