mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Upgrades `require` expressions of `NativeEventEmitter` and `RCTDeviceEventEmitter` to `import`. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D22203919 fbshipit-source-id: 4fdf01b66ba0501d0e0714931923531c97d29be2
26 lines
582 B
JavaScript
26 lines
582 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import EventEmitter from '../../vendor/emitter/EventEmitter';
|
|
import RCTDeviceEventEmitter from '../RCTDeviceEventEmitter';
|
|
|
|
/**
|
|
* Mock the NativeEventEmitter as a normal JS EventEmitter.
|
|
*/
|
|
class NativeEventEmitter extends EventEmitter {
|
|
constructor() {
|
|
super(RCTDeviceEventEmitter.sharedSubscriber);
|
|
}
|
|
}
|
|
|
|
module.exports = NativeEventEmitter;
|