react-native-windows-samples icon indicating copy to clipboard operation
react-native-windows-samples copied to clipboard

Codegen Does Not Generate Files for .tsx File Type

Open chiaramooney opened this issue 1 year ago • 2 comments

This documentation states that "The (spec) file must be named Native<MODULE_NAME>, with a .js or .jsx extension when using Flow, or a .ts, or .tsx extension when using TypeScript". However when I was creating a Turbo Module on canary last week, the codegen file would only generate if I set the file type to ts. It would not generate the codegen source if the file type was .tsx.

chiaramooney avatar Sep 23 '24 19:09 chiaramooney

Documentation should be updated to indicate leave the "x" off. This specific part:

The file must be named Native<MODULE_NAME>, with a .js or .jsx extension when using Flow, or a .ts, or .tsx extension when using TypeScript.

chrisglein avatar Sep 26 '24 18:09 chrisglein

The native modules / codegen docs should be updated as spec files shouldn't have any jsx/tsx content and just be pure js/ts files.

jonthysell avatar Mar 28 '25 20:03 jonthysell