mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49854 Changelog: [GENERAL][ADDED] - Codegen utility functions and types are now exported from the root package Up to this point, third-party libraries needed to use deep imports to access codegen utilities and types This diff exports them from the main entry point, as we want to move away from supporting deep imports in OSS as a part of JS Stable API project. Reviewed By: huntie Differential Revision: D70628408 fbshipit-source-id: 5a6e1cb870465ede0fbc9eb8912d255aa90aa2a8
27 lines
747 B
TypeScript
27 lines
747 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import type {HostComponent} from 'react-native';
|
|
|
|
interface Options {
|
|
readonly interfaceOnly?: boolean | undefined;
|
|
readonly paperComponentName?: string | undefined;
|
|
readonly paperComponentNameDeprecated?: string | undefined;
|
|
readonly excludedPlatforms?: ReadonlyArray<'iOS' | 'android'> | undefined;
|
|
}
|
|
|
|
type NativeComponentType<T> = HostComponent<T>;
|
|
|
|
declare function codegenNativeComponent<Props extends object>(
|
|
componentName: string,
|
|
options?: Options,
|
|
): NativeComponentType<Props>;
|
|
|
|
export default codegenNativeComponent;
|