Files
react-native/types
Nick Gerleman 5928144302 Fix TS Type for measureLayout optional parameter
Summary:
Encountered this, causing typechecking to fail on an example in the current RN documentation.

`onFail` is an optional parameter (see https://github.com/facebook/react/blob/8e2bde6f2751aa6335f3cef488c05c3ea08e074a/packages/react-native-renderer/src/ReactNativeTypes.js#L106), which is not optional in current TS types. Update the TS typings to match.

Note that "?" here is positioned to be a Flow optional parameter, instead of a maybe type. Which means it accepts undefined, but not null, matching the TS usage of "?" which always means possibly undefined (but never null, like a flow maybe type allows).

Changelog:
[General][Fixed] - Fix TS Type for measureLayout optional parameter

Reviewed By: lunaleaps

Differential Revision: D41775900

fbshipit-source-id: 8f53428b8077ec9139c7c1bbc60ed20f5fa9f7ea
2022-12-07 13:25:36 -08:00
..
2022-11-02 14:58:37 -07:00
2022-11-02 14:58:37 -07:00
2022-09-20 12:39:58 -07:00
2022-11-02 14:58:37 -07:00