Add flow types in ReactControlledComponent (#13669)
Abdul Rauf committed
Oct 22, 2018 at 00:35 UTC
409e472fcaae2b6c171f4e9a0c4b5ad88ec2bf21
1 file changed
+6
-2
packages/events/ReactControlledComponent.js
+6
-2
@@ -3,6 +3,8 @@
3
*
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
*/
9
10
import invariant from 'shared/invariant';
@@ -35,11 +37,13 @@ function restoreStateOfTarget(target) {
37
restoreImpl(internalInstance.stateNode, internalInstance.type, props);
38
}
39
38
-export function setRestoreImplementation(impl) {
40
+export function setRestoreImplementation(
41
+ impl: (domElement: Element, tag: string, props: Object) => void,
42
+): void {
43
restoreImpl = impl;
44
}
45
42
-export function enqueueStateRestore(target) {
46
+export function enqueueStateRestore(target: EventTarget): void {
47
if (restoreTarget) {
48
if (restoreQueue) {
49
restoreQueue.push(target);