Skip to content

Microsoft.JavaScript.NodeApi assembly

Microsoft.JavaScript.NodeApi namespace

public typedescription
interface IJSValue<TSelf>A base interface for a struct that represents a JavaScript value type or a built-in object type. It provides functionality for converting between the struct and JSValue.
delegate JSActionCallbackRepresents a low-level void function or method call or callback from JavaScript into .NET.
struct JSArray
struct JSAsyncIterable
struct JSBigInt
delegate JSCallbackRepresents a low-level function or method call or callback from JavaScript into .NET.
struct JSCallbackArgsProvides access to the arguments for a low-level JavaScript function call or callback, along with the this argument and an optional context object.
struct JSDate
class JSDispatcherQueue
class JSDispatcherQueueController
class JSDispatcherQueueTimer
struct JSError
enum JSErrorType
class JSEventEmitterEvent emitter that can be backed by either a Node.js EventEmitter object or a standalone (runtime-agnostic) listener tracker.
class JSExceptionAn exception that was caused by an error thrown by JavaScript code or interactions with JavaScript objects.
class JSExportAttributeExports an item to JavaScript, optionally specifying the name of the export and whether it is the default export of the module.
struct JSFunctionRepresents a JavaScript Function value.
class JSImportAttributeIndicates a class or struct is imported from JavaScript.
class JSInvalidThreadAccessExceptionAn exception that was caused by an attempt to access a JavaScript value without any JSValueScope established on the current thread, or from a thread associated with a different environment / root scope.
struct JSIterable
enum JSKeyCollectionMode
enum JSKeyConversion
[Flags] enum JSKeyFilter
struct JSMap
struct JSObject
struct JSPromiseRepresents a JavaScript Promise object.
[Flags] enum JSPropertyAttributes
struct JSPropertyDescriptorDescribes a property of a JavaScript object, including its name, value, and attributes. Can be converted to a JavaScript property descriptor object using the ToObject method.
struct JSProxyEnables creation of JS Proxy objects with C# handler callbacks.
class JSReferenceA strong or weak reference to a JS value.
struct JSSet
struct JSSymbol
struct JSTypedArray<T>
enum JSTypedArrayType
struct JSValue
class JSValueScopeA scope that controls the lifetime of JS values. When the scope is disposed, any JS values created within the scope are released unless they are held by a strong JSReference.
class JSValueScopeClosedExceptionAn exception that was caused by an attempt to access a JSValue (or a more specific JS value type, such as JSObject or JSArray) after its JSValueScope was closed.
enum JSValueScopeTypeIndicates the type of JSValueScope within the hierarchy of scopes.
enum JSValueType
static class NodeApiStatusExtensions
static class TaskExtensionsExtension methods for converting between .NET tasks and JS promises.

Microsoft.JavaScript.NodeApi.Interop namespace

public typedescription
struct JSAbortSignalRepresents a JavaScript AbortSignal object and supports conversion to and from CancellationToken.
struct JSAsyncScopeHelps preventing Node.JS process from exiting while we execute C# async functions.
struct JSCallbackDescriptorDescriptor for a callback not associated with an object property, for example a constructor callback or standalone function callback. Enables passing a data object via the callback args data.
struct JSCallbackOverloadHolds overload resolution information (parameter types) for one of multiple overloads for a .NET method.
class JSClassBuilder<T>
static class JSCollectionExtensions
abstract class JSInterfaceBase class for a dynamically generated interface adapter that enables a JS object to implement a .NET interface. Holds a reference to the underlying JS value.
class JSModuleAttributeDesignates a non-static class or static method that initializes the JS module.
class JSModuleBuilder<T>Builds JS module exports.
class JSModuleContextManages JavaScript interop context for the lifetime of a .NET module.
abstract class JSPropertyDescriptorList<TDerived,TObject>
class JSRuntimeContextManages JavaScript interop context for the lifetime of the .NET Node API host.
abstract class JSSynchronizationContextManages the synchronization context for a JavaScript environment, allowing callbacks and asynchronous continuations to be invoked on the JavaScript thread that runs the environment.
delegate JSThreadSafeCallback
delegate JSThreadSafeFinalizeCallback
class JSThreadSafeFunction
static class NodeProcessProvides information about, and control over, the current Node.js process.
class NodeStreamRepresents a Node.js Duplex, Readable, or Writable stream.
class NodeWorkerA Node.js worker thread, as documented at https://nodejs.org/api/worker_threads.html.
static class TypeExtensions

Microsoft.JavaScript.NodeApi.Runtime namespace

public typedescription
abstract class JSRuntimeAbstract base class for a JavaScript runtime.
static class NativeLibraryProvides APIs for managing native libraries.
class NodejsEnvironmentA Node.js runtime environment with a dedicated main execution thread.
class NodejsPlatformManages a Node.js platform instance, provided by libnode.
class NodejsRuntime
class TracingJSRuntimeWraps a JSRuntime and traces all the calls from .NET to JS, including basic inspection of arguments, out values, and return status.

Released under the MIT license