From 7b14180302747c49123b8dbdcfc8382b43aee3ba Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Tue, 14 Feb 2023 10:12:34 -0800 Subject: [PATCH] fix: remove unavailable EventEmitter TS export (#36109) Summary: currently, using TS, this is a valid import: `import { EventEmitter } from 'react-native';` However, looking at the [index file](https://github.com/facebook/react-native/blob/main/index.js) we can see that there is no such export. I first thought I'd add the EventEmitter export in order to get the `index.js` in line with the types, but it appears that the Event Emitter will become a separate package at some point https://github.com/facebook/react-native/pull/34401 so removing it from the types seems to be better for future. ## Changelog fix: remove unavailable EventEmitter TS export Pick one each for the category and type tags: [INTERNAL] [CHANGED] - remove unavailable EventEmitter TS export For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: https://github.com/facebook/react-native/pull/36109 Test Plan: tested locally: using `import { EventEmitter } from 'react-native';` correctly gives `TS2305: Module '"react-native"' has no exported member 'EventEmitter'.` Reviewed By: javache, cortinico Differential Revision: D43155568 Pulled By: NickGerleman fbshipit-source-id: b9e8c3f4be9812637c8588d14a9ce4edf188ed36 --- types/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 349efc65a9fc8c..268383e915a0fb 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -147,7 +147,6 @@ export * from '../Libraries/Utilities/Platform'; export * from '../Libraries/Vibration/Vibration'; export * from '../Libraries/YellowBox/YellowBoxDeprecated'; export * from '../Libraries/vendor/core/ErrorUtils'; -export * from '../Libraries/vendor/emitter/EventEmitter'; export * from './public/DeprecatedPropertiesAlias'; export * from './public/Insets';