mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull request https://github.com/facebook/react-native/issues/34251 only partially worked because I didn't notice that there is ` 1` after the snapshot name. In this change I fixed the issue and find out there is one case that Flow and TypeScript parser generate different result. It is expected since the test inputs are different. TypeScript removes one member because there is no `{...X, ...}` type in TypeScript. We could make the codegen support intersection type and rewrite it to `X & {...}`, but this will not be included here anyway. ## Changelog [General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output Pull Request resolved: https://github.com/facebook/react-native/pull/34620 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: NickGerleman Differential Revision: D39321965 Pulled By: cipolleschi fbshipit-source-id: aec60f5c9c18323cbd833bf5705af544d7db2e73