diff --git a/packages/react-native/Libraries/Core/registerCallableModule.d.ts b/packages/react-native/Libraries/Core/registerCallableModule.d.ts new file mode 100644 index 00000000000000..05d9e92da7c717 --- /dev/null +++ b/packages/react-native/Libraries/Core/registerCallableModule.d.ts @@ -0,0 +1,16 @@ +/** + * 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 + */ + +type Module = Object; +type RegisterCallableModule = ( + name: string, + moduleOrFactory: Module | (() => Module), +) => void; + +export const registerCallableModule: RegisterCallableModule; diff --git a/packages/react-native/types/index.d.ts b/packages/react-native/types/index.d.ts index b23e2e0a2ff267..5aeec0685ed009 100644 --- a/packages/react-native/types/index.d.ts +++ b/packages/react-native/types/index.d.ts @@ -103,6 +103,7 @@ export * from '../Libraries/Components/View/View'; export * from '../Libraries/Components/View/ViewAccessibility'; export * from '../Libraries/Components/View/ViewPropTypes'; export * from '../Libraries/Components/Button'; +export * from '../Libraries/Core/registerCallableModule'; export * from '../Libraries/DevToolsSettings/DevToolsSettingsManager'; export * from '../Libraries/EventEmitter/NativeEventEmitter'; export * from '../Libraries/EventEmitter/RCTDeviceEventEmitter';