Skip to content

pointers: drop the Node util type from published declarations - #376

Merged
gnidan merged 1 commit into
mainfrom
pointers-inspect-types
Oct 9, 2026
Merged

gnidan merged 1 commit into
mainfrom
pointers-inspect-types

Conversation

@gnidan

@gnidan gnidan commented Oct 9, 2026

Copy link
Copy Markdown
Member

Data.inspect and its util.inspect.custom hook typed their options as util.InspectOptionsStylized, so the published .d.ts imported Node's util types. Newer @types/node versions no longer export that name, and consumers that type-check with skipLibCheck: false got errors (PR #374 pins @types/node@20 in its consumer check to work around it). The options are now a small local interface (stylize and depth) and the inspect argument a structural function type, so the declarations no longer reference Node. Runtime output is unchanged. I packed the package and type-checked a consumer with skipLibCheck: false against @types/node 20 and 26 (latest), and with no @types/node (with the dom lib for console): all pass.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-09 00:53 UTC

@gnidan
gnidan merged commit 2683f5f into main Oct 9, 2026
7 checks passed
@gnidan
gnidan deleted the pointers-inspect-types branch October 9, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant