Skip to content

Commit

Permalink
Update regex used to check for codegenNativeComponent
Browse files Browse the repository at this point in the history
Summary: Updates regex to allow for type casts

Reviewed By: TheSavior

Differential Revision: D16717249

fbshipit-source-id: f22561d5cd33ab129fc0af4490692344726d7d71
  • Loading branch information
rickhanlonii authored and facebook-github-bot committed Aug 9, 2019
1 parent 742a544 commit 2e32b8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function combineSchemas(files: Array<string>): SchemaType {
const contents = fs.readFileSync(filename, 'utf8');
if (
contents &&
(/export\s+default\s+codegenNativeComponent</.test(contents) ||
(/export\s+default\s+\(?codegenNativeComponent</.test(contents) ||
/extends TurboModule/.test(contents))
) {
const schema = FlowParser.parseFile(filename);
Expand Down

0 comments on commit 2e32b8c

Please sign in to comment.