mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
241b1a6462
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51135 In generated types default exported variables are re-declared which shadows attached tags and doc blocks. This transform moves necessary comments on top of re-declarations to keep them accessible. Example output for SafeAreaView: ```ts import type { ViewProps } from "../View/ViewPropTypes"; import View from "../View/View"; import * as React from "react"; declare const exported: (props: Omit<ViewProps, keyof { ref?: React.Ref<React.ComponentRef<typeof View>>; }> & { ref?: React.Ref<React.ComponentRef<typeof View>>; }) => React.ReactNode; /** * Renders nested content and automatically applies paddings reflect the portion * of the view that is not covered by navigation bars, tab bars, toolbars, and * other ancestor views. * * Moreover, and most importantly, Safe Area's paddings reflect physical * limitation of the screen, such as rounded corners or camera notches (aka * sensor housing area on iPhone X). */ declare const SafeAreaView_DEFAULT: typeof exported; declare type SafeAreaView_DEFAULT = typeof SafeAreaView_DEFAULT; export default SafeAreaView_DEFAULT; ``` Changelog: [Internal] Reviewed By: huntie Differential Revision: D74249424 fbshipit-source-id: 5cdd1c746e7fed99e3d3427d6ebf4c0e7ba3f3fd