Skip to content

Commit af0159a

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Adding Flow types for FabricUIManager measure calls
Summary: These are the same types as the existing measure calls on Paper's UIManager except ReactTag has been replaced with Node Reviewed By: fkgozali Differential Revision: D14732142 fbshipit-source-id: b757e0d1f8d168232d8ba58938cdcd3b30e006ff
1 parent c36151e commit af0159a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Libraries/ReactNative/FabricUIManager.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @flow strict
7+
* @flow strict-local
88
* @format
99
*/
1010
'use strict';
1111

12+
import type {
13+
MeasureOnSuccessCallback,
14+
MeasureInWindowOnSuccessCallback,
15+
MeasureLayoutOnSuccessCallback,
16+
} from 'ReactNativeTypes';
17+
1218
// TODO: type these properly.
1319
type Node = {};
1420
type NodeSet = Array<Node>;
@@ -31,6 +37,17 @@ type Spec = {|
3137
+appendChildToSet: (childSet: NodeSet, child: Node) => void,
3238
+completeRoot: (rootTag: number, childSet: NodeSet) => void,
3339
+setNativeProps: (node: Node, nativeProps: NodeProps) => void,
40+
+measure: (node: Node, callback: MeasureOnSuccessCallback) => void,
41+
+measureInWindow: (
42+
node: Node,
43+
callback: MeasureInWindowOnSuccessCallback,
44+
) => void,
45+
+measureLayout: (
46+
node: Node,
47+
relativeNode: Node,
48+
onFail: () => void,
49+
onSuccess: MeasureLayoutOnSuccessCallback,
50+
) => void,
3451
|};
3552

3653
const FabricUIManager: ?Spec = global.nativeFabricUIManager;

0 commit comments

Comments
 (0)