Skip to content

feat: backfill various missing node APIs - #75760

Draft
SimonSchick wants to merge 4 commits into
DefinitelyTyped:masterfrom
SimonSchick:node/missing-declarations-v26
Draft

SimonSchick wants to merge 4 commits into
DefinitelyTyped:masterfrom
SimonSchick:node/missing-declarations-v26

Conversation

@SimonSchick

@SimonSchick SimonSchick commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Select one of these and delete the others:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

References discussion #75608

I'm filing this in good faith having previously contributed these definitions a few years ago and wanting to make the backfill process generally less painful, there are some new features (such as throttle and debounce) that I'm particularly interested in but I think doing a set of larger backfill is generally beneficial for such a foundational definition package.

This PR exclusively adds missing declarations it makes no effort to correct existing ones (eg. function parameters), I deliberately limited the size of the PR but due to the sheer amount of JSDoc it is still quite large, if general consensus is 'too large' I will split it up.

Further I believe splitting these changes up too much adds undue burden on reviewers and would cause release 'spam', ideally changes would be released in sync with the nodejs releases to keep them small, but due to the lack of tight coupling of the types to the actual nodejs repo this has generally been infeasible and bulk backfilling is a more economical approach.

I also added a CLAUDE.md

Summary of changes (from claude)

Citations

Docs: https://nodejs.org/docs/latest-v26.x/api/ · Changelog: CHANGELOG_V26.md

Module Declaration Docs Added Upstream PR
zlib ZipFile docs v26.8.0 #64339
zlib ZipEntry docs v26.8.0 #64339
zlib ZipBuffer docs v26.8.0 #64339
zlib createZipArchive docs v26.8.0 #64339
zlib createZipArchiveSync docs v26.8.0 #64339
zlib zipFiles docs v26.8.0 #64339
zlib getMaxZipContentSize docs v26.8.0 #64339
zlib setMaxZipContentSize docs v26.8.0 #64339
crypto createMac docs v26.9.0 #65553
crypto getMacs docs v26.9.0 #65553
crypto Mac class · update · final v26.9.0 #65553
net BlockList#addCIDR, #addCIDRs, #addAddresses addCIDR · addCIDRs · addAddresses v26.8.0 #64974
net BlockList#removeAddress, #removeRange, #removeSubnet, #removeCIDR removeAddress · removeRange · removeSubnet · removeCIDR v26.8.0 #64974
net BlockList#clear, #size, static PRIVATE_RANGES clear · size · PRIVATE_RANGES v26.8.0 #64974
net BoundSocketOptions.path docs v26.7.0 #64399
net BoundSocket#isPipe docs v26.7.0 #64399
net Server#dropMaxConnection docs v23.1.0, v22.12.0 #54927
perf_hooks createSlidingWindowHistogram fn · class v26.10.0 #65825
perf_hooks importHistogram docs v26.9.0 #65434
perf_hooks Histogram#export docs v26.9.0 #65434
perf_hooks Histogram#cdf, #ccdf, #countAt, #percentilesAt, #linearBuckets, #logBuckets, #ksTest, #kurtosis, #skewness cdf · ccdf · countAt · percentilesAt · linearBuckets · logBuckets · ksTest · kurtosis · skewness v26.8.0 #65024
perf_hooks Histogram#burnRate, #mannWhitneyTest, #welchTest, #cohensD, #cliffsD, #percentileCI, #ewmaMean, #ewmaStddev, #ewmaErrorRate burnRate · mannWhitneyTest · welchTest · cohensD · cliffsD · percentileCI · ewmaMean · ewmaStddev · ewmaErrorRate v26.8.0 #65416
perf_hooks Histogram#meanCI docs v26.9.0 #65606
perf_hooks Histogram#qrde docs v26.10.0 #65806
perf_hooks RecordableHistogram#recordCorrected, #subtract recordCorrected · subtract v26.8.0 #65024
perf_hooks PerformanceResourceTiming#finalResponseHeadersStart, #firstInterimResponseStart, #renderBlockingStatus, #contentType, #contentEncoding finalResponseHeadersStart · firstInterimResponseStart · renderBlockingStatus · contentType · contentEncoding · W3C v26.9.0 #65017
sqlite StatementSync#close, #[Symbol.dispose] close · dispose v26.8.0 #64232
sqlite StatementSync#stat, #resetStats stat · resetStats v26.8.0 #64541
http2 20 HTTP2_HEADER_* constants pseudo · regular documented v26.8.0 #64548 (docs)
http2 Http2ServerResponse#writeInformation docs · source v26.2.0 #63155
http2 Http2Server#timeout Http2Server · Http2SecureServer v8.4.0 #14239
util debounce docs v26.10.0 #65899
util throttle docs v26.10.0 #65899
util markPromiseAsHandled docs v26.10.0 #65805
util MIMEType.parse docs v26.8.0 #64965
util MIMEType#toJSON docs v19.1.0, v18.13.0 (with class) —
fs openAsBlobSync docs v26.10.0 #65644
fs constants.UV_FS_O_TEMPORARY, UV_FS_O_SHORT_LIVED, UV_FS_O_SEQUENTIAL, UV_FS_O_RANDOM docs v26.8.0 #64775
v8 setHeapProfileNearHeapLimit docs v26.9.0 #64676
v8 Serializer#_setTreatArrayBufferViewsAsHostObjects, #_getDataCloneError _setTreat… · _getDataCloneError v8.0.0 #11048
v8 DefaultSerializer#_writeHostObject, DefaultDeserializer#_readHostObject _writeHostObject · _readHostObject v8.0.0 #11048
process initgroups docs v0.9.4 CHANGELOG_ARCHIVE
stream isDestroyed docs v19.9.0, v18.17.0 #45671 · docs #64789
tty ReadStream#rawMode docs v26.8.0 #64140
module ModuleHooks#[Symbol.dispose] docs v26.7.0 #63928
ffi DynamicLibrary#functions docs v26.1.0 CHANGELOG 26.1.0
ffi 'float32' / 'float64' type names docs v26.1.0 #62892 · docs #64874
node:test entryFile on test:stdout / test:stderr stdout · stderr v26.6.0 #64309
node:test counts.failed on test:summary docs v22.10.0 #54851
— package.json 26.10 CHANGELOG 26.10.0 — —

Notes

  • Experimental (Stability 1.x), no flag required: zlib ZIP API, crypto.createMac/getMacs, v8.setHeapProfileNearHeapLimit, node:ffi (enabled by default since v26.9.0, #65475). Marked @experimental.
  • Pre-v26 omissions: process.initgroups, counts.failed, v8 _-prefixed serializer methods, MIMEType#toJSON, Server#dropMaxConnection, Http2Server#timeout, DynamicLibrary#functions.
  • Upstream docs history blocks are malformed for BlockList#clear and MIMEType.parse; the version is taken from the changelog.
  • New required members on existing interfaces/classes (Histogram, RecordableHistogram, Http2ServerCommon.timeout, StatementSync, ModuleHooks[Symbol.dispose], TestSummary.counts.failed) affect only hand-written implementations or object literals typed as these interfaces. Existing subclasses overriding the v8 _-prefixed methods require override under noImplicitOverride.
  • Excluded (only available behind a runtime flag): FileHandle#pullSync (--experimental-stream-iter), SourceTextModule#createCachedData (--experimental-vm-modules).
  • Out of scope (signature change to an existing declaration): tty.ReadStream#setRawMode accepts 'raw' | 'io' since v26.8.0 (#64140); BoundSocket#address() returns a string for pipe binds (docs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Author Action

Development

Successfully merging this pull request may close these issues.

1 participant