Files
react-native/Libraries/Utilities/codegenNativeCommands.js
T
Eli White b526f66c19 Back out "Back out "[RNCodegen] codegenNativeCommands takes list of supported commands""
Summary:
Original commit changeset: 34a8f8395ca7

The problem with the original commit was the usage of optional chaining. This diff removes the usage of optional chaining with good old fashioned null checks.

Reviewed By: rickhanlonii

Differential Revision: D16593623

fbshipit-source-id: d24cc40c85de9a2e712e5de19e9deb196003ccf2
2019-08-01 15:05:57 -07:00

22 lines
447 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
type Options<T = string> = $ReadOnly<{|
supportedCommands: $ReadOnlyArray<T>,
|}>;
function codegenNativeCommands<T>(options: Options<$Keys<T>>): T {
return (({}: any): T);
}
export default codegenNativeCommands;