requireNativeComponent now only takes a string and returns a string. See the definition here: 1151c096da/Libraries/ReactNative/requireNativeComponent.js (L24-L27).
The return type here is specified as `React.ReactType`, which is a union type that includes strings. We can't use `string` because TypeScript treats it as an intrinsic element like `div` and thinks it has no props.
Updated the corresponding test code too.
* Added allowFileAccess property for Android WebView
* Updated version number (allowFileAccess is a new property)
* Revert "Updated version number (allowFileAccess is a new property)"
This reverts commit 14077bf1e92e7b3be2e4d165f32ee1f0e763435f.
Adjusted the prop types of the returned native component class so that (a) the `nativeOnly` set of props adds to the prop types and (b) not all the props from the JS component are required (using `Partial`).
Fixes `requireNativeComponent`, which was conflating the type of PropTypes maps with the type of prop maps. That is, these are not of the same type: `{ x: PropTypes.string }` and `{ x: "hello" }`.
Also fixes the type of the `ViewPropTypes` object. It is a map of PropTypes, not a single PropType. Additionally, made the types of the other PropType exports more precise instead of `PropType.any`.
Please fill in this template.
- [x] Use a meaningful title for the pull request. Include the name of the package modified.
- [x] Test the change in your own code. (Compile and run.)
- [x] Add or edit tests to reflect the change. (Run with `npm test`.)
- [x] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).
- [x] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).
- [x] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).
If changing an existing definition:
- [x] Provide a URL to documentation or source code which provides context for the suggested changes: **N/A** -- these are fixes
- [x] Increase the version number in the header if appropriate. **N/A**
- [x] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`. **N/A**
Added the type declaration and copied the documentation for this static function. The type of the `process` parameter should be `(nextProp: unknown) => unknown` but I stuck with `any` to preserve 2.x compatibility.