mirror of
https://github.com/react/react-native.git
synced 2026-10-31 19:13:44 +08:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48474 The previous definition said that you could put prop types into commands, which definitely isn't allowed. For example, the schema would have allowed `WithDefault` types. ``` interface NativeCommands { +methodInt: (viewRef: React.ElementRef<NativeType>, a: WithDefault<string, 'hi'>) => void; } ``` This change separates out the things that are allowed in commands from what's allowed in props. Commands should be very similar to what's allowed in native modules, but it isn't exact enough to be able to merge those. ## Changelog: [General][Breaking] - Codegen: Separate component array types and command array types Reviewed By: cipolleschi Differential Revision: D67806818 fbshipit-source-id: 58e504fe2e2e5efa612e836b18af22a167e7ae2f