Skip to content

Commit

Permalink
Export EmitterSubscription TypeScript Type (facebook#36632)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#36632

Discovered when bumping the RN documentation to typecheck against 0.72, facebook#36109 removed the `EmitterSubscription` type which should be kept public.

Changelog:
[General][Fixed] -  Export EmitterSubscription TypeScript Type

Differential Revision: D44375081

fbshipit-source-id: a75e4be326deedbeb06370860344f3c96b9a5426
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Mar 24, 2023
1 parent ebc97a6 commit 72a2308
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-native/types/__typetests__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import {
DrawerLayoutAndroid,
DrawerSlideEvent,
DynamicColorIOS,
EmitterSubscription,
EventSubscription,
FlatList,
FlatListProps,
GestureResponderEvent,
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ export * from '../Libraries/Utilities/Platform';
export * from '../Libraries/Vibration/Vibration';
export * from '../Libraries/YellowBox/YellowBoxDeprecated';
export * from '../Libraries/vendor/core/ErrorUtils';
export {
EmitterSubscription,
EventSubscription,
} from '../Libraries/vendor/emitter/EventEmitter';

export * from './public/DeprecatedPropertiesAlias';
export * from './public/Insets';
Expand Down

0 comments on commit 72a2308

Please sign in to comment.