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 10import EventEmitter, { 11 EmitterSubscription, 12 EventSubscriptionVendor, 13} from '../vendor/emitter/EventEmitter'; 14 15/** 16 * Deprecated - subclass NativeEventEmitter to create granular event modules instead of 17 * adding all event listeners directly to RCTDeviceEventEmitter. 18 */ 19interface DeviceEventEmitterStatic extends EventEmitter { 20 sharedSubscriber: EventSubscriptionVendor; 21 new (): DeviceEventEmitterStatic; 22 addListener( 23 type: string, 24 listener: (data: any) => void, 25 context?: any, 26 ): EmitterSubscription; 27} 28 29export const DeviceEventEmitter: DeviceEventEmitterStatic; 30