Skip to content

Conversation

@rschristian
Copy link
Member

@rschristian rschristian commented Dec 27, 2025

Closes #4980

The actual fix was straightforward, only touching /jsx-runtime/src/index.d.ts, but the linting fix was more involved.

Whilst we have a linter that should've caught that problem, turns out we had skipLibCheck: true enabled -- this skips checking for source .d.ts files as well as those in node_modules. Removing this immediately caused issues however as vite and vitest require more modern TS setups.

As such, the jsconfig-lint.json got a bit of a facelift to make it more modern & compatible, whilst also removing the skipLibCheck setting so that we now get warned of type errors again. Yay.

Re: compat/server.d.ts, no idea what to do about that one. TS is grumpy about the mixed exports (rightfully so) and I spent an hour trying various ways to get around it with no luck. It works at runtime for consumers, so I just silenced the errors. We know that's a problem with our types anyhow (ESM-only anyone??)

@coveralls
Copy link

coveralls commented Dec 27, 2025

Coverage Status

coverage: 99.443%. remained the same
when pulling 6c33d1f on fix/jsx-runtime-types
into 5a02923 on main.

@@ -1,58 +0,0 @@
/**
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was added for Vitest but conflicts with our @types/node version and seems unnecessary now. I imagine this was a holdover until we had bumped @types/node and just forgot to clean it up.

object: object;
}

export type WeakKey = WeakKeyTypes[keyof WeakKeyTypes];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vitest relies on it, copied from es5.d.ts

@rschristian rschristian merged commit bf7a195 into main Dec 28, 2025
5 checks passed
@rschristian rschristian deleted the fix/jsx-runtime-types branch December 28, 2025 23:28
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.

stale JSXInternal.HTMLAttributes and JSXInternal.SVGAttributes references in 11.0.0-beta.0

4 participants