Skip to content

fix: keep the uneval replacer typed under nodenext module resolution - #215

Closed
NotAFlightRisk wants to merge 1 commit into
sveltejs:mainfrom
NotAFlightRisk:fix/uneval-replacer-type
Closed

NotAFlightRisk wants to merge 1 commit into
sveltejs:mainfrom
NotAFlightRisk:fix/uneval-replacer-type

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

With moduleResolution: nodenext (or node16) in your tsconfig, the replacer you pass to uneval lost its types in 6.0.2. Put the README's replacer example through strict and you get Parameter 'value' implicitly has an 'any' type, then the same again for js.

The import for the replacer type is the ony one in src/ with no .js on the end. Since #209 that path gets copied as-is into the published uneval.d.ts, where nodenext won't resolve it. Bundler resolution isn't effected. That's what the type check here runs on, so it never showed up.

@changeset-bot

changeset-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f13307a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
devalue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Nic-Polumeyv

Copy link
Copy Markdown
Member

Superseded by #225, which makes the same fix and switches test:types to nodenext so it can't regress. Thanks!

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.

2 participants