Skip to content

Gentype ouput discrepancy between compiler v11 and v12 #7106

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

Closed
mununki opened this issue Oct 18, 2024 · 0 comments · Fixed by #7107
Closed

Gentype ouput discrepancy between compiler v11 and v12 #7106

mununki opened this issue Oct 18, 2024 · 0 comments · Fixed by #7107

Comments

@mununki
Copy link
Member

mununki commented Oct 18, 2024

The genType output of the compiler v12 differs from v11 for the jsx component. import type {element as Jsx_element} from './Jsx.gen.tsx'; statement occurs the runtime error as 'Module not found'

// Title.res
@genType @react.component
let make = (~text) => {
  <div className="title"> {text->React.string} </div>
}

v11

/* TypeScript file generated from Title.res by genType. */
/* eslint-disable */
/* tslint:disable */
import * as TitleJS from './Title.mjs';
export type props<text> = { readonly text: text };
export const make: React.ComponentType<{ readonly text: string }> = TitleJS.make as any;

v12

/* TypeScript file generated from Title.res by genType. /
/ eslint-disable /
/ tslint:disable */
import * as TitleJS from './Title.mjs';
import type {element as Jsx_element} from './Jsx.gen.tsx'; // Error: module not found
export type props<text> = { readonly text: text };
export const make: (_1:props<string>) => Jsx_element = TitleJS.make as any;
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 a pull request may close this issue.

1 participant