Skip to content

Commit eb83356

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Export EmitterSubscription TypeScript Type (#36632)
Summary: Pull Request resolved: #36632 Discovered when bumping the RN documentation to typecheck against 0.72, #36109 removed the `EmitterSubscription` type which should be kept public. Changelog: [General][Fixed] - Export EmitterSubscription TypeScript Type Reviewed By: cortinico Differential Revision: D44375081 fbshipit-source-id: c8dbd5694d3a728a0a2091210894d27c9d84a012
1 parent 4e97283 commit eb83356

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/react-native/types/__typetests__/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ import {
4040
DrawerLayoutAndroid,
4141
DrawerSlideEvent,
4242
DynamicColorIOS,
43+
EmitterSubscription,
44+
EventSubscription,
4345
FlatList,
4446
FlatListProps,
4547
GestureResponderEvent,

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export * from '../Libraries/Utilities/Platform';
147147
export * from '../Libraries/Vibration/Vibration';
148148
export * from '../Libraries/YellowBox/YellowBoxDeprecated';
149149
export * from '../Libraries/vendor/core/ErrorUtils';
150+
export {
151+
EmitterSubscription,
152+
EventSubscription,
153+
} from '../Libraries/vendor/emitter/EventEmitter';
150154

151155
export * from './public/DeprecatedPropertiesAlias';
152156
export * from './public/Insets';

0 commit comments

Comments
 (0)