mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 11:40:33 +08:00
feat: expose AnimatedEvent (#22984)
Summary: Some third party components rely on the `AnimatedEvent` as a type (see https://github.com/kmagiera/react-native-gesture-handler/blob/master/Swipeable.js#L9). In order to not rely on a path which could change at any time it would be great to expose it. Changelog: ---------- [General][added] - Expose AnimatedEvent Pull Request resolved: https://github.com/facebook/react-native/pull/22984 Differential Revision: D13682678 Pulled By: cpojer fbshipit-source-id: 2f2b228e3f49e6afe623fd551220ef2147e79550
This commit is contained in:
committed by
Facebook Github Bot
parent
7d881c1d8a
commit
35e7fdd79d
@@ -158,7 +158,7 @@ class AnimatedEvent {
|
||||
};
|
||||
}
|
||||
|
||||
_callListeners(...args) {
|
||||
_callListeners(...args: any) {
|
||||
this._listeners.forEach(listener => listener(...args));
|
||||
}
|
||||
|
||||
|
||||
@@ -685,5 +685,10 @@ module.exports = {
|
||||
forkEvent,
|
||||
unforkEvent,
|
||||
|
||||
/**
|
||||
* Expose Event class, so it can be used as a type for type checkers.
|
||||
*/
|
||||
Event: AnimatedEvent,
|
||||
|
||||
__PropsOnlyForTests: AnimatedProps,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user