Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[React 19] Publishing the TypeScript declaration of babel-plugin-react-compiler #29098

Open
SukkaW opened this issue May 16, 2024 · 2 comments
Open

Comments

@SukkaW
Copy link

SukkaW commented May 16, 2024

Description

I am currently integrating React's new experimental compiler into my projects, specifically through the development of a Next.js plugin and a webpack loader, which can be found here: react-compiler-webpack. During this process, I've encountered an issue where the TypeScript definitions for the new compiler are not available on npm. Since the compiler itself is written in TypeScript, having these definitions available would be immensely beneficial for ensuring type safety and enhancing developer productivity, especially in complex projects like Next.js and webpack plugins.

Expected Behavior

The TypeScript definitions for React's new experimental compiler should be published to npm, allowing developers to import and use these definitions seamlessly in TypeScript-based projects.

Current Behavior

The TypeScript definitions are not currently available on npm, which complicates the development process for TypeScript users who need to ensure type safety and utilize IDE features like auto-completion and inline documentation.

Proposed Solution

I kindly request that the TypeScript definitions for the new experimental compiler be published to npm. This would not only aid in my current project but also benefit the broader TypeScript and React communities who are experimenting with or adopting the new compiler.

Thank you for considering this request. I am looking forward to any updates and am happy to assist in the testing or development of these definitions if needed.

@poteto
Copy link
Member

poteto commented May 17, 2024

We didn't include types in the npm package because the babel plugin doesn't have an external API that we want to expose. The only way we recommend to consume it is inside of a Babel compatible pipeline as a plugin. Is your use case mainly to type the config that the compiler accepts?

@SukkaW
Copy link
Author

SukkaW commented May 17, 2024

type the config that the compiler accepts

Yeah. That would be the only usage case.

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

No branches or pull requests

3 participants