Files
react-native/packages/react-native/Libraries/Utilities/codegenNativeComponent.d.ts
T
Jakub Piasecki c7aa3f3fe7 Export codegen functions and types from the main package (#49854)
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
2025-03-12 09:20:55 -07:00

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;