SharpTS Node.js Module Support Status

June 20, 2026 · View on GitHub

This document tracks Node.js module and API implementation status in SharpTS.

Last Updated: 2026-04-07 (Web Streams API — node:stream/web and globals: ReadableStream, WritableStream, TransformStream, queuing strategies, both interpreter and compiled modes)

Legend

  • ✅ Implemented
  • ⚠️ Partially Implemented
  • ❌ Not Implemented

1. CORE NODE.JS MODULES

ModuleStatusNotes
fsSync, callback-based async, and fs.promises APIs
pathFull API
osFull API
processProperties + methods, available as module and global
cryptoHash, HMAC, Cipher, PBKDF2, scrypt, HKDF (sync + async callback), RSA encrypt/decrypt, Sign/Verify, DH/ECDH, KeyPair (sync + async), KeyObject
urlWHATWG URL + legacy parse/format/resolve
querystringparse, stringify, escape, unescape
assertFull testing utilities
child_processexecSync, spawnSync, exec, spawn, execFileSync, execFile, fork (IPC via named pipes); ChildProcess EventEmitter with kill, send, disconnect, stdin
utilformat, inspect, isDeepStrictEqual, parseArgs, toUSVString, stripVTControlCharacters, getSystemErrorName, getSystemErrorMap, promisify, types helpers, deprecate, callbackify, inherits, TextEncoder/TextDecoder
consolelog, error, warn, info, debug, clear, time/timeEnd/timeLog, assert, count/countReset, table, dir, group/groupEnd, trace
readlinequestionSync, createInterface (extends EventEmitter), question, close, prompt, pause, resume, write, setPrompt, getPrompt
eventsEventEmitter with on/off/once/emit/removeListener
streamReadable, Writable, Duplex, Transform, PassThrough (sync mode)
stream/webWHATWG Streams: ReadableStream, WritableStream, TransformStream, ByteLengthQueuingStrategy, CountQueuingStrategy. See Section 19.
bufferFull Buffer class with multi-byte LE/BE, float/double, BigInt, search, swap
timerssetTimeout, setInterval, setImmediate + clear variants (module import)
timers/promisesPromise-based setTimeout/setImmediate (with AbortSignal), AsyncIterable setInterval
string_decoderStringDecoder class for multi-byte character handling
perf_hooksperformance.now(), timeOrigin, mark(), measure(), getEntries/ByName/ByType(), clearMarks/Measures(); PerformanceObserver
http / httpscreateServer, request, get; IncomingMessage extends Readable; ServerResponse extends Writable; full event lifecycle
netcreateServer, createConnection/connect, Socket, Server; isIP, isIPv4, isIPv6
tlscreateServer, connect, createSecureContext, TLSSocket, Server; DEFAULT_MIN_VERSION, DEFAULT_MAX_VERSION; ALPNProtocols, SNICallback, servername; secureConnect/secureConnection/tlsClientError events
dnslookup, lookupService, resolve, resolve4, resolve6, reverse, resolveMx, resolveTxt, resolveSrv, resolveCname, resolveNs, resolveSoa, resolvePtr, resolveCaa, resolveNaptr (callback + dns/promises)
zlibgzip, deflate, deflateRaw, brotli, zstd (sync + streaming + async callback APIs)
worker_threads⚠️Worker, MessageChannel, parentPort, workerData, isMainThread
dgramcreateSocket, Socket; bind, send, close, address, setBroadcast, setTTL, addMembership, dropMembership; connect, disconnect, remoteAddress, get/setRecvBufferSize, get/setSendBufferSize; message/listening/close/error/connect events
clusterisPrimary/isWorker/isMaster, fork, worker.send/disconnect/kill/isDead/isConnected, process.send (IPC), cluster events (fork/online/disconnect/exit/message), cluster.disconnect, setupPrimary, workers dict
vmrunInNewContext, runInThisContext, createContext, isContext, compileFunction, Script class
async_hooksAsyncLocalStorage: run, getStore, enterWith, exit, disable; async context propagation via .NET AsyncLocal

2. FILE SYSTEM (fs)

FeatureStatusNotes
File Operations
existsSync
readFileSyncSupports encoding option
writeFileSync
appendFileSync
copyFileSync
renameSync
unlinkSync
truncateSyncTruncate file to specified length
Directory Operations
mkdirSyncSupports recursive option
rmdirSync
readdirSyncSupports recursive and withFileTypes options
mkdtempSyncCreate unique temp directory
opendirSyncReturns Dir object with readSync/closeSync
File Info
statSyncReturns Stats object
lstatSyncStats without following symlinks
accessSyncCheck file access permissions
realpathSyncResolve canonical path
File Descriptor APIs
openSyncOpen file, returns fd (flags: r, w, a, r+, w+, a+, etc.)
closeSyncClose file descriptor
readSyncRead into Buffer at offset/position
writeSyncWrite Buffer or string to fd
fstatSyncStats for open file descriptor
ftruncateSyncTruncate open file descriptor
Links
linkSyncCreate hard link (cross-platform)
symlinkSyncCreate symbolic link
readlinkSyncRead symbolic link target
Permissions
chmodSyncChange file mode/permissions
chownSyncChange file owner (Unix only)
lchownSyncChange symlink owner (Unix only)
utimesSyncUpdate file access/modification times
Async APIs (Callback)
readFileCallback-based async
writeFileCallback-based async
appendFileCallback-based async
stat / lstatCallback-based async
unlinkCallback-based async
mkdir / rmdirCallback-based async
readdirCallback-based async
rename / copyFileCallback-based async
access / chmodCallback-based async
truncate / utimesCallback-based async
readlink / realpathCallback-based async
symlink / linkCallback-based async
mkdtempCallback-based async
Promise APIs (fs/promises)
fs/promisesFull promise-based API (also via fs.promises)
Advanced
createReadStreamReturns Readable stream with data, end, error events
createWriteStreamReturns Writable stream with finish, error events
watchReturns FSWatcher (EventEmitter) with change, rename, error, close events; supports recursive option
watchFilePolling-based file watching with (current, previous) Stats callback; supports interval option
unwatchFileStop watching a file previously started with watchFile
Error CodesENOENT, EACCES, EEXIST, EISDIR, ENOTDIR, ENOTEMPTY, EBADF, EXDEV, etc.

3. PATH (path)

FeatureStatusNotes
join
resolve
basename
dirname
extname
normalize
isAbsolute
relative
parseReturns { root, dir, base, ext, name }
format
sepPlatform path separator
delimiterPlatform path list delimiter
posixPOSIX-style path methods (always uses /)
win32Windows-style path methods (always uses \)

4. OS (os)

FeatureStatusNotes
platform
arch
hostname
homedir
tmpdir
type
release
cpusReturns CPU info array
totalmem
freemem
userInfo
EOLPlatform line ending
networkInterfacesReturns network interface information
loadavgReturns [0, 0, 0] on Windows (Node.js behavior)

5. PROCESS

FeatureStatusNotes
Properties
platform
arch
pid
version
envEnvironment variables
argvCommand-line arguments
exitCode
stdinBasic input support
stdoutwrite() method
stderrwrite() method
Methods
cwd
chdir
exit
hrtimeHigh-resolution time
uptime
memoryUsage
nextTickSchedules callback (implemented via timer)
Events
on('exit')Process extends EventEmitter; exit event emitted before process.exit()
on('uncaughtException')Process extends EventEmitter; uncaughtException event support
on(event, listener)Full EventEmitter API (on, once, off, emit, removeAllListeners, etc.)

6. CRYPTO

FeatureStatusNotes
Hashing
createHashmd5, sha1, sha256, sha384, sha512
createHmacmd5, sha1, sha256, sha384, sha512 with string/Buffer keys
Random
randomBytes
randomFillSyncFill buffer with random bytes in-place
randomUUID
randomInt
Cipher
createCipherivAES-128/192/256-CBC and AES-128/192/256-GCM
createDecipherivAES-128/192/256-CBC and AES-128/192/256-GCM
createCipher / createDecipherDeprecated in Node.js, use iv variants
Key Derivation
pbkdf2Syncsha1, sha256, sha384, sha512 (not md5)
scryptSyncWith N/cost, r/blockSize, p/parallelization options
pbkdf2 / scryptAsync callback-based versions with event loop integration
Comparison
timingSafeEqualConstant-time buffer comparison (prevents timing attacks)
Signing
createSign / createVerifyRSA and EC keys; SHA1/256/384/512; hex/base64/Buffer output
Key Generation
generateKeyPairSyncRSA (2048/4096) and EC (P-256/P-384/P-521); PEM format
generateKeyPairAsync callback-based version with (err, publicKey, privateKey) signature
Diffie-Hellman
createDiffieHellmanWith prime length or explicit prime/generator
getDiffieHellmanPredefined groups: modp1, modp2, modp5, modp14-18
createECDHP-256 (prime256v1), P-384 (secp384r1), P-521 (secp521r1)
Discovery
getHashesReturns array of supported hash algorithms
getCiphersReturns array of supported cipher algorithms
RSA Encryption
publicEncryptRSA-OAEP encryption (SHA-1 default)
privateDecryptRSA-OAEP decryption
privateEncryptRSA PKCS#1 v1.5 signing primitive
publicDecryptRSA PKCS#1 v1.5 verification primitive
HKDF
hkdfSyncHKDF key derivation (RFC 5869); sha256, sha384, sha512
hkdfAsync callback-based version with event loop integration
KeyObject
createSecretKeyCreate symmetric KeyObject from Buffer
createPublicKeyCreate public KeyObject from PEM
createPrivateKeyCreate private KeyObject from PEM
KeyObject.type'secret', 'public', or 'private'
KeyObject.asymmetricKeyType'rsa' or 'ec' (undefined for secret)
KeyObject.asymmetricKeyDetailsmodulusLength/publicExponent for RSA, namedCurve for EC
KeyObject.symmetricKeySizeByte length (secret keys only)
KeyObject.export()Export to PEM string or Buffer

7. URL

FeatureStatusNotes
WHATWG URL API
URL classFull property access
URLSearchParamsget, set, has, append, delete, keys, values, size
Legacy API
parse
format
resolve

8. CHILD PROCESS

FeatureStatusNotes
Sync Methods
execSyncWith cwd, timeout, env, shell options
spawnSyncWith cwd, timeout, env options
execFileSyncExecute file directly (no shell); with cwd, timeout, env
Async Methods
execAsync with callback(error, stdout, stderr); returns ChildProcess EventEmitter
spawnAsync; returns ChildProcess with stdout/stderr/stdin streams and events
execFileExecute file directly (no shell); async with callback; returns ChildProcess
forkSpawns new SharpTS process with IPC channel via named pipes; parent/child send/on('message')
ChildProcess
pidProcess ID
exitCodeExit code (null until exit)
killedWhether process was killed
stdout / stderrReadable streams (spawn/fork)
stdinWritable stream (spawn)
kill(signal?)Actually kills the process (with entireProcessTree)
send(message)IPC messaging (fork only)
disconnect()Close IPC channel (fork only)
connectedIPC connection status (fork only)
on/once/offEventEmitter: close, exit, error, message, disconnect events
ref() / unref()Event loop ref counting (basic)

9. UTIL

FeatureStatusNotes
Formatting
format()Placeholders: %s, %d, %i, %f, %j, %o, %O, %%
inspect()Object stringification with depth option
stripVTControlCharacters()Remove ANSI escape sequences
Comparison
isDeepStrictEqual()Deep equality (NaN equals NaN)
CLI Parsing
parseArgs()Boolean/string options, short/long flags, negation
String Utilities
toUSVString()Replace lone surrogates with replacement char
System Errors
getSystemErrorName()POSIX errno to name (70+ codes)
getSystemErrorMap()Map of errno to [name, description]
Function Utilities
deprecate()Wrap function with deprecation warning
callbackify()Convert Promise function to callback style
inherits()Set up prototype chain (sets super_)
TextEncoder
new TextEncoder()UTF-8 encoder
encode()String to Uint8Array
encodeInto()Encode into existing buffer
TextDecoder
new TextDecoder()Supports utf-8, latin1, utf-16le
decode()Buffer to string
util.types
types.isArray()Array check
types.isDate()Date check
types.isFunction()Function check
types.isNull()Null check (not undefined)
types.isUndefined()Undefined check (not null)
types.isPromise()Promise check
types.isRegExp()RegExp check
types.isMap()Map check
types.isSet()Set check
types.isTypedArray()Buffer/TypedArray check
types.isNativeError()Error check
types.isBoxedPrimitive()Always false (no boxed primitives)
types.isWeakMap()WeakMap check
types.isWeakSet()WeakSet check
types.isArrayBuffer()ArrayBuffer check
Async/Promisify
promisify()Converts callback-style to Promise-returning

10. MODULE SYSTEM

FeatureStatusNotes
ES Modules
import { x } from './file'Named imports
import x from './file'Default imports
import * as x from './file'Namespace imports
export { x }Named exports
export default xDefault exports
export * from './file'Re-exports
import type { T }Type-only imports
import('./file')Dynamic imports
import.meta.urlModule URL (file:// format)
import.meta.dirnameDirectory of current module
import.meta.filenameFull path of current module
CommonJS Interop
import x = require('path')CommonJS import syntax
export =CommonJS export syntax
require() functionBoth interpreter and compiled modes. Loads .cjs/.js files, follows package.json type field, supports circular requires with partial exports, throws MODULE_NOT_FOUND on missing modules (catchable via try/catch). Compiled mode requires string-literal specifiers — non-literals are a SHARPTS_CJS001 compile error.
module.exportsBoth modes. module.exports = X and exports.foo = X patterns supported. Reassignment semantics match Node. Compiled mode lowers module.exports/exports to direct static field accesses on the per-file $Module_X class.
exports shorthandBoth modes.
ESM imports CJSimport x from './file.cjs', named imports, and namespace imports all work; CJS exports are typed as any.
.cjs extensionAlways treated as CommonJS regardless of nearest package.json.
.mjs extensionAlways treated as ES module.
package.json type field"module" → ESM, "commonjs" or absent → CJS for .js files.
Resolution
Relative paths./foo, ../bar
Bare specifiersnode_modules lookup
Directory indexLooks for index.ts
Extension inferenceAdds .ts automatically
Circular detectionWith error reporting
/// <reference>Triple-slash references
package.json exportsSubpath exports, wildcard patterns, main/types/typings fallback, .js→.ts extension mapping
Conditional exportsConditions: types, import, default; nested conditions; array fallbacks; null restrictions
Subpath imports (#)"imports" field in package.json with #-prefixed specifiers
Self-referencingPackage imports itself by name through its own exports
Scoped packages@scope/pkg and @scope/pkg/subpath resolution

11. GLOBALS

FeatureStatusNotes
globalThisES2020 global reference
processAvailable globally
consoleconsole.log and variants
setTimeout / clearTimeout
setInterval / clearInterval
__dirnameDirectory of current module
__filenameFull path of current module
requireAvailable globally in both interpreter and compiled modes. Compiled mode requires string-literal specifiers (non-literals are a compile error).
modulePer-module CJS binding (matches Node — not on globalThis). Interpreter binds in module scope; compiled mode lowers module.exports to the per-file $Module_X.exports static field.
exportsPer-module CJS binding (matches Node — not on globalThis). Same lowering as module.exports in compiled mode.
BufferFull Buffer class available globally
global⚠️Use globalThis

12. STREAMS

FeatureStatusNotes
Readable
new Readable()Constructor with options
push(chunk)Add data to buffer; null signals EOF
read()Read from buffer
pipe(dest)Pipe to Writable/Duplex, returns destination
unpipe(dest)Remove pipe destination
readableProperty: stream is readable
readableEndedProperty: EOF reached
readableLengthProperty: buffer size
'end' eventEmitted when EOF reached
Writable
new Writable()Constructor with write callback option
write(chunk)Write data, invokes write callback
end()Signal end of writes
cork() / uncork()Buffer writes
writableProperty: stream is writable
writableEndedProperty: end() called
writableFinishedProperty: all data flushed
'finish' eventEmitted when all writes complete
Duplex
new Duplex()Readable + Writable combined
All Readable methodsInherited
All Writable methodsAdded
Transform
new Transform()Constructor with transform callback
transform(chunk, enc, cb)Transform callback; cb(null, data) pushes
All Duplex methodsInherited
PassThrough
new PassThrough()Transform that passes data unchanged
Process Streams
process.stdoutFull Writable stream: write(), end(), cork(), uncork(), on/once/off events, writable/writableEnded/writableFinished properties, isTTY
process.stderrFull Writable stream: write(), end(), cork(), uncork(), on/once/off events, writable/writableEnded/writableFinished properties, isTTY
process.stdinFull Readable stream: on('data'), on('end'), read(), pause(), resume(), pipe(), setEncoding(), readable/readableEnded properties, isTTY; background Console.In reader thread
Flowing Mode
Auto-flowing on data listenerEnters flowing mode when 'data' listener added
pause() / resume()Flow control with buffer draining on resume
readableFlowing propertynull/false/true states
Pipe backpressurePauses source on writable backpressure, resumes on drain
Object Mode
Object modeobjectMode: true option; streams accept any JS value (both interpreter and compiled modes)
readableObjectModeProperty: whether readable side is in object mode
writableObjectModeProperty: whether writable side is in object mode
Not Implemented
highWaterMark enforcementpush() returns false at threshold; write() byte-based backpressure; pipe pauses/resumes on drain

13. EVENTS

FeatureStatusNotes
EventEmitter classFull implementation
on() / addListener()
once()
emit()
removeListener() / off()
removeAllListeners()
listenerCount()
listeners()
eventNames()
prependListener()
prependOnceListener()
defaultMaxListenersStatic property

14. ZLIB (Compression)

FeatureStatusNotes
Gzip
gzipSyncCompress using gzip
gunzipSyncDecompress gzip data
Deflate
deflateSyncCompress with zlib header
inflateSyncDecompress zlib data
deflateRawSyncCompress without header
inflateRawSyncDecompress raw deflate
Brotli
brotliCompressSyncBrotli compression
brotliDecompressSyncBrotli decompression
Zstd
zstdCompressSyncZstandard compression
zstdDecompressSyncZstandard decompression
Utilities
unzipSyncAuto-detect and decompress
constantsCompression constants object
Options
levelCompression level (0-9)
chunkSizeBuffer size for streaming
maxOutputLengthMaximum output size limit
windowBits⚠️Not directly supported in .NET
memLevel⚠️Not directly supported in .NET
strategy⚠️Not directly supported in .NET
Async Callback APIs
gzip / gunzipCallback-based async (interpreter mode)
deflate / inflateCallback-based async (interpreter mode)
deflateRaw / inflateRawCallback-based async (interpreter mode)
brotliCompress / brotliDecompressCallback-based async (interpreter mode)
unzipCallback-based async with auto-detect (interpreter mode)
Streaming APIs (Transform)
createGzip / createGunzipReturns Transform stream; true streaming compression, accumulate-then-decompress
createDeflate / createInflateReturns Transform stream; zlib header format
createDeflateRaw / createInflateRawReturns Transform stream; raw deflate format
createBrotliCompress / createBrotliDecompressReturns Transform stream; Brotli format
createUnzipReturns Transform stream; auto-detects gzip/deflate/raw

15. TIMERS

FeatureStatusNotes
Timeout
setTimeout()Schedule callback after delay
clearTimeout()Cancel scheduled timeout
Interval
setInterval()Schedule repeating callback
clearInterval()Cancel interval
Immediate
setImmediate()Schedule callback for next tick
clearImmediate()Cancel immediate
Module Import
import { setTimeout } from 'timers'Named imports
import * as timers from 'timers'Namespace import

16. TIMERS/PROMISES

FeatureStatusNotes
Import
import { setTimeout } from 'timers/promises'Named import
import * as timers from 'timers/promises'Namespace import
import { setTimeout } from 'node:timers/promises'Node prefix import
Methods
setTimeout(delay?, value?, options?)Returns Promise<T> that resolves with value after delay ms; supports options.signal
setImmediate(value?, options?)Returns Promise<T> that resolves with value immediately; supports options.signal
setInterval(delay?, value?, options?)Returns an async iterable for for await...of; supports options.signal (interpreter mode)
AbortSignal Support
setTimeout with options.signalThrows AbortError on pre-aborted signal or mid-delay abort (both modes)
setImmediate with options.signalThrows AbortError on pre-aborted signal (both modes)
setInterval with options.signalThrows AbortError on pre-abort; iterator ends cleanly on mid-iteration abort (both modes)
Not Implemented
options.refTimer ref/unref control
scheduler.wait() / scheduler.yield()Scheduler API

17. STRING_DECODER

FeatureStatusNotes
Constructor
new StringDecoder()Default encoding: utf8
new StringDecoder(encoding)utf8, utf-8, utf16le, ucs2, latin1, ascii
Methods
write(buffer)Decode buffer, handle partial sequences
end()Flush remaining bytes
end(buffer)Write final buffer and flush
Properties
encodingReturns normalized encoding name
Multi-byte Handling
UTF-8 sequencesProperly buffers incomplete sequences
UTF-16LE pairsHandles byte alignment

17. PERF_HOOKS

FeatureStatusNotes
performance
performance.now()High-resolution monotonic timestamp
performance.timeOriginUnix timestamp when process started
performance.mark(name, options?)Creates PerformanceMark entry; options.startTime supported
performance.measure(name, start?, end?)Creates PerformanceMeasure between marks
performance.getEntries()Returns all performance entries
performance.getEntriesByName(name, type?)Filter entries by name, optionally by type
performance.getEntriesByType(type)Filter entries by 'mark' or 'measure'
performance.clearMarks(name?)Clear all marks or by name
performance.clearMeasures(name?)Clear all measures or by name
PerformanceObserver
new PerformanceObserver(callback)Create observer with callback
observer.observe({ entryTypes })Start observing specified entry types
observer.disconnect()Stop receiving notifications
Import
import { performance } from 'perf_hooks'Named import
import { PerformanceObserver } from 'perf_hooks'Named import
import * as perf from 'perf_hooks'Namespace import

18. BUFFER

FeatureStatusNotes
Static Methods
Buffer.from()From string, array, or Buffer
Buffer.alloc()Zero-filled allocation
Buffer.allocUnsafe()Uninitialized allocation
Buffer.concat()Concatenate multiple buffers
Buffer.isBuffer()Type check
Buffer.byteLength()String byte length
Buffer.compare()Static comparison
Buffer.isEncoding()Encoding validation
Instance Properties
lengthBuffer byte length
Instance Methods
toString()With encoding support
slice()Create view/copy
copy()Copy to target buffer
compare()Compare with other buffer
equals()Equality check
fill()Fill with value/string
write()Write string at offset
readUInt8()Read unsigned byte
writeUInt8()Write unsigned byte
toJSON()Serialize to {type, data}
Multi-byte Reads
readUInt16LE/BE()Unsigned 16-bit
readUInt32LE/BE()Unsigned 32-bit
readInt8()Signed 8-bit
readInt16LE/BE()Signed 16-bit
readInt32LE/BE()Signed 32-bit
readBigInt64LE/BE()Signed 64-bit BigInt
readBigUInt64LE/BE()Unsigned 64-bit BigInt
readFloatLE/BE()32-bit float
readDoubleLE/BE()64-bit double
Multi-byte Writes
writeUInt16LE/BE()Unsigned 16-bit
writeUInt32LE/BE()Unsigned 32-bit
writeInt8()Signed 8-bit
writeInt16LE/BE()Signed 16-bit
writeInt32LE/BE()Signed 32-bit
writeBigInt64LE/BE()Signed 64-bit BigInt
writeBigUInt64LE/BE()Unsigned 64-bit BigInt
writeFloatLE/BE()32-bit float
writeDoubleLE/BE()64-bit double
Search & Swap
indexOf()Find first occurrence
includes()Check if value exists
swap16/32/64()Byte order swapping

19. WEB APIs

FeatureStatusNotes
fetch()
fetch(url)Basic GET request
fetch(url, options)With request configuration
Request Options
methodGET, POST, PUT, DELETE, PATCH, etc.
headersCustom request headers as object
bodyString request body
Response Object
statusHTTP status code
statusTextHTTP status message
okTrue if status 200-299
urlFinal URL after redirects
headersResponse headers as object
Response Methods
json()Parse body as JSON (returns Promise)
text()Get body as string (returns Promise)
arrayBuffer()Get body as ArrayBuffer (returns Promise)
Async Support
await fetch(...)Full async/await support
Promise chaining.then() style
response.bodyReadable stream (body eagerly loaded, streamed via Readable)
Headers classConstructable new Headers(init?) with get/set/has/delete/append/forEach/entries/keys/values
AbortController / signal optionnew AbortController(), signal.aborted, abort(reason?), throwIfAborted(), AbortSignal.abort()/timeout()/any(); fetch signal option with pre-abort check and cancellation
Not Implemented
Request classnew Request(url, init?) with method, headers, body, clone(); json(), text(), arrayBuffer()
Response classnew Response(body?, init?) with status, statusText, ok, headers, clone(); json(), text(), arrayBuffer(); static json(), redirect(), error()
credentials option'omit', 'same-origin' (default, matches Node/undici), 'include'. Backed by a process-wide cookie jar via System.Net.CookieContainer — handles RFC 6265 parsing, domain/path matching, expiry, Secure/HttpOnly. Each compiled DLL has its own jar.
redirect optionfollow (default), manual (return 3xx), error (throw on redirect)
Cookie jar
fetch.cookieJar.getCookies(url)Returns the Cookie: header that would be sent for url. SharpTS extension.
fetch.cookieJar.setCookie(cookie, url)Manually inject a cookie into the jar as if received from url. SharpTS extension.
fetch.cookieJar.clear()Removes all cookies from the jar. SharpTS extension.
headers.getSetCookie()Returns all Set-Cookie values as an array (WHATWG spec).
headers.get('set-cookie')Returns first cookie value (WHATWG spec).
Cookies persisted to diskProcess-only; lost on exit.
http.Agent cookies optionCookies are jar-wide; per-Agent jars deferred.
Web Streams (WHATWG)
ReadableStreamnew ReadableStream(underlyingSource?, strategy?); start/pull/cancel callbacks; getReader(), cancel(), pipeTo(dest, opts?), pipeThrough(transform, opts?), tee(); locked property
ReadableStreamDefaultControllerenqueue(), close(), error(), desiredSize
ReadableStreamDefaultReaderread() returns Promise<{value, done}>, releaseLock(), cancel(), closed promise
WritableStreamnew WritableStream(underlyingSink?, strategy?); start/write/close/abort callbacks; getWriter(), close(), abort(); serialized write queue
WritableStreamDefaultControllererror(), signal (AbortSignal)
WritableStreamDefaultWriterwrite(), close(), abort(), releaseLock(), closed/ready promises, desiredSize
TransformStreamnew TransformStream(transformer?, writableStrategy?, readableStrategy?); transform/flush callbacks; readable/writable properties
TransformStreamDefaultControllerenqueue(), terminate(), error(), desiredSize
ByteLengthQueuingStrategynew ByteLengthQueuingStrategy({ highWaterMark }); size(chunk) measures byteLength
CountQueuingStrategynew CountQueuingStrategy({ highWaterMark }); size() returns 1
pipeTo optionspreventClose, preventAbort, preventCancel, signal
ReadableStream.from(iterable)⚠️Eager forms supported (Array, string, Set). Async iterables and lazy iteration deferred.
Symbol.asyncIterator on ReadableStreamfor await (const chunk of rs) not yet supported. Use getReader() + manual read() loop.
BYOB readers / type: 'bytes'ReadableByteStreamController, BYOB requests deferred.
Transferable streamspostMessage() of stream objects not supported.
Both globals and node:stream/web exportsAll five constructors are global AND exported from node:stream/web.
Available in interpreter and compiled modesCompiled mode uses late-binding reflection to runtime types (in LateBindingAllowlist); pure-IL emission deferred.

20. DNS

FeatureStatusNotes
Methods
lookupResolve hostname to IP; supports family and all options
lookupServiceReverse lookup (IP to hostname)
Constants
ADDRCONFIGAddress configuration hint
V4MAPPEDMap IPv4 to IPv6 hint
ALLReturn all addresses hint
Async Resolution
resolveAsync callback-based; supports rrtype parameter (A, AAAA, MX, TXT, SRV, CNAME, NS, SOA, PTR, CAA, NAPTR)
resolve4Async callback-based; resolves IPv4 via the DNS wire protocol (c-ares-style, honors SHARPTS_DNS_SERVER; does not read the hosts file — use lookup for that)
resolve6Async callback-based; resolves IPv6 via the DNS wire protocol (c-ares-style; does not read the hosts file)
reverseAsync callback-based; reverse DNS lookup
resolveMxMX records → [{ exchange, priority }]
resolveTxtTXT records → string[][] (chunks per record)
resolveSrvSRV records → [{ name, port, priority, weight }]
resolveCnameCNAME records → string[]
resolveNsNS records → string[]
resolveSoaSOA record → { nsname, hostmaster, serial, refresh, retry, expire, minttl }
resolvePtrPTR records → string[]
resolveCaaCAA records → [{ critical, issue/issuewild/iodef }]
resolveNaptrNAPTR records → [{ flags, service, regexp, replacement, order, preference }]
Promise API
dns/promisesPromise-based: all callback methods available as promise variants
dns.promisesSub-module access to promise API
Resolver
Resolver classnew dns.Resolver() with configurable servers
resolver.setServers()Set custom DNS servers (IP addresses with optional port)
resolver.getServers()Get configured DNS server list
resolver.resolve()All resolve methods use configured servers
resolver.cancel()⚠️No-op (no cancellation tracking)

21. HTTP

FeatureStatusNotes
Server
createServerCreate HTTP server with request handler
server.listen()Start listening on port
server.close()Stop server
Client
requestMake HTTP request (delegates to fetch)
getShorthand for GET requests
Constants
METHODSArray of supported HTTP methods
STATUS_CODESMap of status codes to messages
globalAgentGlobal HTTP agent (SharpTSAgent singleton with full Agent API)
IncomingMessage
Readable stream methodson, pipe, read, pause, resume, push (extends Readable)
method, url, headersRequest properties
httpVersionProtocol version
rawHeadersAlternating [name, value] array
completeWhether body has been fully read
ServerResponse
Writable stream methodson, write, end, cork, uncork (extends Writable)
writeHead()Set status code, message, and headers
setHeader() / getHeader()Individual header management
hasHeader() / removeHeader()Header inspection and removal
getHeaderNames()List all set header names
flushHeaders()Send headers immediately
statusCode / statusMessageReadable/writable properties
headersSent / finishedState properties
finish / close eventsWritable stream events on end
Agent
Agent classnew http.Agent(options?) constructor with keepAlive, maxSockets, maxTotalSockets, maxFreeSockets, keepAliveMsecs, timeout, scheduling
agent.destroy()Marks agent as destroyed
agent.getName(options?)Returns pool key string (host:port:localAddress:family)
agent.createConnection()Stub (connection pooling handled by .NET HttpClient)
agent.sockets/freeSockets/requestsEmpty objects (pooling managed internally by .NET)

22. NET (TCP)

FeatureStatusNotes
Server
createServer(options?, listener?)Create TCP server with optional connection listener
server.listen(port, host?, callback?)Start listening on port; supports port 0 for auto-assign
server.close(callback?)Stop accepting new connections
server.address()Returns { address, family, port }
server.getConnections(callback)Get number of concurrent connections
server.listeningWhether server is listening
server.maxConnectionsLimit concurrent connections
Server events'connection', 'listening', 'close', 'error'
Socket
createConnection(options, listener?)Create client socket and connect
connect(options, listener?)Alias for createConnection
socket.write(data, encoding?, callback?)Write data to socket
socket.end(data?, encoding?, callback?)Half-close the socket
socket.destroy(error?)Fully close and clean up
socket.setEncoding(encoding)Set string encoding for data events
socket.setTimeout(timeout, callback?)Set socket timeout
socket.setNoDelay(noDelay?)Disable Nagle's algorithm
socket.setKeepAlive(enable?, delay?)Enable/disable keep-alive
socket.address()Local address info
socket.pause() / resume()Flow control
socket.pipe(dest)Pipe to writable stream
Socket propertiesremoteAddress, remotePort, remoteFamily, localAddress, localPort, bytesRead, bytesWritten, connecting, destroyed, readyState
Socket events'connect', 'data', 'end', 'close', 'error', 'drain', 'timeout'
Utilities
isIP(input)Returns 4 (IPv4), 6 (IPv6), or 0 (invalid)
isIPv4(input)True if valid IPv4 address
isIPv6(input)True if valid IPv6 address
IPC
IPC socketsNamed pipes (Windows) / Unix domain sockets (Linux/macOS); server.listen(path), createConnection({path}), remoteFamily='pipe', error codes (ENOENT/ECONNREFUSED)
socket.ref() / unref()⚠️Basic support via event loop ref counting

23. TLS (SSL)

FeatureStatusNotes
Server
createServer(options?, listener?)Create TLS server with cert/key options
server.listen(port, host?, callback?)Start listening; requires key+cert
server.close(callback?)Stop accepting new connections
server.address()Returns { address, family, port }
server.getConnections(callback)Get number of concurrent connections
server.listeningWhether server is listening
Server events'secureConnection', 'tlsClientError', 'listening', 'close', 'error'
TLSSocket
connect(port, host?, options?, callback?)Create TLS client connection
connect(options, callback?)Options-based connect variant
socket.authorizedWhether peer certificate was verified
socket.encryptedAlways true for TLS sockets
socket.alpnProtocolNegotiated ALPN protocol
socket.getCipher()Returns { name, standardName, version }
socket.getPeerCertificate()Returns { subject, issuer, valid_from, valid_to, serialNumber }
socket.getProtocol()Returns 'TLSv1.2' or 'TLSv1.3'
All net.Socket methodsInherits write, end, destroy, setEncoding, etc.
TLSSocket events'secureConnect' + all net.Socket events
Module Functions
createSecureContext(options?)Create reusable secure context
DEFAULT_MIN_VERSION'TLSv1.2'
DEFAULT_MAX_VERSION'TLSv1.3'
Advanced
ALPN negotiationALPNProtocols option on client and server; socket.alpnProtocol returns negotiated protocol
Client certificate auth⚠️requestCert option exists but limited
SNI callbackSNICallback option on server; receives hostname, returns { cert, key } for dynamic cert selection

24. DGRAM (UDP)

FeatureStatusNotes
Socket Creation
createSocket(type)'udp4' or 'udp6'
createSocket(options, callback?)Options with type field
Socket Methods
socket.bind(port?, address?, callback?)Bind to local address; port 0 for auto-assign
socket.send(msg, port, address?, callback?)Send datagram; string or Buffer
socket.send(msg, offset, length, port, address?, callback?)Send with offset/length
socket.close(callback?)Close socket
socket.address()Returns { address, family, port }
socket.setBroadcast(flag)Enable/disable broadcast
socket.setTTL(ttl)Set IP TTL
socket.setMulticastTTL(ttl)Set multicast TTL
socket.addMembership(addr, iface?)Join multicast group
socket.dropMembership(addr)Leave multicast group
socket.ref() / unref()Event loop ref counting
Events
'message'(msg: Buffer, rinfo: { address, family, port, size })
'listening'Emitted after bind completes
'close'Emitted after socket closed
'error'Emitted on error
EventEmitteron, once, off, emit, removeListener, etc.
Connected Mode
socket.connect(port, address?)Connected UDP mode; emits 'connect' event
socket.disconnect()Disconnect from remote address
socket.remoteAddress()Returns { address, family, port } for connected socket
socket.getRecvBufferSize() / setRecvBufferSize()Receive buffer size control
socket.getSendBufferSize() / setSendBufferSize()Send buffer size control

25. WORKER_THREADS

FeatureStatusNotes
Worker Creation
Worker constructorCreate worker from script file
workerDataPass data to worker
Thread Identity
isMainThreadCheck if running on main thread
threadIdCurrent thread identifier
Messaging
parentPortPort for worker-to-parent communication
MessageChannelCreate connected port pairs
receiveMessageOnPortSync message receive
postMessageSend messages between threads
Environment
getEnvironmentDataGet shared environment data
setEnvironmentDataSet shared environment data
SHARE_ENV⚠️Symbol exists, env sharing not supported
Utilities
markAsUntransferable⚠️No-op (no transferability tracking)
Not Implemented
moveMessagePortToContextRequires VM module
resourceLimitsNo resource limiting
BroadcastChannelnew BroadcastChannel(name); postMessage, close, on('message'), addEventListener, ref/unref; also exported from worker_threads. Cross-thread delivery within a single process via the singleton event loop.

26. VM

FeatureStatusNotes
Static Methods
vm.runInNewContext(code, ctx?, opts?)Executes code in fresh isolated context; context object properties seeded as variables; mutations written back
vm.runInThisContext(code, opts?)Executes code in caller's scope (interpreter mode)
vm.createContext(obj?)Tags object as vm context; creates empty context if no arg
vm.isContext(obj)Returns whether object was contextified
Script Class
new vm.Script(code, opts?)Pre-parses code for repeated execution (interpreter mode)
script.runInNewContext(ctx?, opts?)Runs pre-parsed script in fresh context (interpreter mode)
script.runInThisContext(opts?)Runs pre-parsed script in caller's scope (interpreter mode)
script.runInContext(ctx, opts?)Runs pre-parsed script in given context (interpreter mode)
vm.compileFunction(code, params?, opts?)Compiles function body with named params; parsingContext, contextExtensions options
Not Implemented
vm.Module / vm.SourceTextModuleExperimental in Node.js
timeout optionExecution timeout in ms; throws Error on expiry; checked per-statement and per-loop-iteration
vm.measureMemoryV8-specific, not applicable

Summary

SharpTS provides comprehensive support for file system operations (sync, callback-based async, and promise-based via fs/promises), including file descriptor APIs, directory utilities, hard/symbolic links, permissions, file watching (watch, watchFile, unwatchFile), and streaming (createReadStream, createWriteStream). Also includes path manipulation, OS information, process management, crypto (hashing, encryption, key derivation, signing), URL parsing, binary data handling via Buffer, EventEmitter for event-driven patterns, timers (setTimeout/setInterval/setImmediate), string decoding for multi-byte characters, high-resolution performance timing, stream classes (Readable, Writable, Duplex, Transform, PassThrough) with flowing mode (auto-flowing on data listener, pause/resume, pipe backpressure), the Web Fetch API for HTTP client requests with AbortController support, HTTP/HTTPS servers via http.createServer/https.createServer, TLS/SSL via tls module, TCP via net module, UDP via dgram module (including connected mode), DNS resolution (full record type support), cluster module for multi-process scaling, and Worker Threads for parallel execution. The module system supports both ES modules and CommonJS import syntax.

Key Gaps:

  • None — all major Node.js APIs are implemented

Recommended Workarounds:

  • Use ES module syntax instead of require()
  • Use fetch() for HTTP client requests (simpler than http.request)

Priority features to implement for broader Node.js compatibility:

  1. package.json exports ✅ Implemented: subpath exports, conditional exports, wildcard patterns, self-referencing, subpath imports
  2. AsyncLocalStorage / async_hooks ✅ Implemented: AsyncLocalStorage with run, getStore, enterWith, exit, disable; async context propagation across await/Promise.then
  3. IPC sockets ✅ Implemented: Named pipes (Windows) / Unix domain sockets (Linux/macOS) with error codes, server.address() returns pipe path
  4. cluster HTTP port sharing ✅ Implemented: SharedTcpListener/SharedHttpListener with round-robin dispatch via atomic counter; server.listen() intercepted in worker mode
  5. vm.timeout option ✅ Implemented: CancellationToken-based timeout checked per-statement and per-loop-iteration; throws Error on expiry