Skip to content

Commit daf012a

Browse files
Kudohuntie
authored andcommitted
Add registerCallableModule types (facebook#43366)
Summary: `registerCallableModule()` was added from 7f549ec but no typescript types there. this pr tries to add the corresponding types. ## Changelog: [GENERAL] [FIXED] - Add missing `registerCallableModule` TypeScript definitions Pull Request resolved: facebook#43366 Test Plan: patch locally and try to `import { registerCallableModule } from 'react-native';` in a 0.74.0-rc.2 project Reviewed By: fabriziocucci Differential Revision: D54676151 Pulled By: cortinico fbshipit-source-id: cd01f2ebe2d2516b458fae5b2e83cba3d3794455
1 parent 40a4df0 commit daf012a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
*/
9+
10+
type Module = Object;
11+
type RegisterCallableModule = (
12+
name: string,
13+
moduleOrFactory: Module | (() => Module),
14+
) => void;
15+
16+
export const registerCallableModule: RegisterCallableModule;

packages/react-native/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export * from '../Libraries/Components/View/View';
103103
export * from '../Libraries/Components/View/ViewAccessibility';
104104
export * from '../Libraries/Components/View/ViewPropTypes';
105105
export * from '../Libraries/Components/Button';
106+
export * from '../Libraries/Core/registerCallableModule';
106107
export * from '../Libraries/DevToolsSettings/DevToolsSettingsManager';
107108
export * from '../Libraries/EventEmitter/NativeEventEmitter';
108109
export * from '../Libraries/EventEmitter/RCTDeviceEventEmitter';

0 commit comments

Comments
 (0)