Skip to content

Gentype ouput discrepancy between compiler v11 and v12 #7106

Closed
@mununki

Description

@mununki

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions