From 419722bd07e7495a45feadc0ce116a832f880d98 Mon Sep 17 00:00:00 2001 From: Eli White Date: Tue, 24 Sep 2019 18:49:31 -0700 Subject: [PATCH] Flow type vendor/core/merge.js Summary: This is used by Image.android.js and needs to be flow typed to be able to have confidence in the requireNativeComponent type change Changelog: [Internal] Flow type vendor/core/merge.js Reviewed By: JoshuaGross Differential Revision: D17561195 fbshipit-source-id: 2639f2628e15b2dd5469bb2ebfe935a444025a21 --- Libraries/vendor/core/merge.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Libraries/vendor/core/merge.js b/Libraries/vendor/core/merge.js index a294d4af6d9..dea7716a282 100644 --- a/Libraries/vendor/core/merge.js +++ b/Libraries/vendor/core/merge.js @@ -3,9 +3,12 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. + * + * @flow + * @format */ -"use strict"; +'use strict'; const mergeInto = require('./mergeInto'); @@ -16,10 +19,11 @@ const mergeInto = require('./mergeInto'); * @param {?object} two Optional object with properties to merge from. * @return {object} The shallow extension of one by two. */ -const merge = function(one, two) { +const merge = function(one: T1, two: T2): {...T1, ...T2} { const result = {}; mergeInto(result, one); mergeInto(result, two); + // $FlowFixMe mergeInto is not typed return result; };