From d3321831fc8dbf627d2324feff8a26397de4a1e9 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Wed, 17 Aug 2022 16:04:30 +0200 Subject: [PATCH] Fix codegen trying to parse `.d.ts` files --- .../src/cli/combine/combine-js-to-schema-cli.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js index 1c8fc7bc2f437e..a1f09deff48e21 100644 --- a/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js +++ b/packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js @@ -27,7 +27,9 @@ function filterJSFile(file: string) { // NativeSampleTurboModule is for demo purpose. It should be added manually to the // app for now. !file.endsWith('NativeSampleTurboModule.js') && - !file.includes('__tests') + !file.includes('__tests') && + // Ignore TypeScript type declaration files. + !file.endsWith('.d.ts') ); }