Use different function syntax that the JS parser used to build the website can understand
Summary: For some reason the parser doesn't support that syntax. It fails with: ``` Cannot parse file ../Libraries/Animated/src/AnimatedImplementation.js Error: parseSource returned falsy at parseAPIInferred (/home/ubuntu/react-native/website/server/extractDocs.js:343:13) ``` Reviewed By: sahrens Differential Revision: D4669961 fbshipit-source-id: 3536c94b8f385f5810c47544c4a72c8c785bf0e5
This commit is contained in:
parent
7978f7a27b
commit
adf650debc
|
@ -2215,6 +2215,7 @@ function unforkEvent(event: ?AnimatedEvent | ?Function, listener: Function): voi
|
|||
class AnimatedEvent {
|
||||
_argMapping: Array<?Mapping>;
|
||||
_listeners: Array<Function> = [];
|
||||
_callListeners: Function;
|
||||
_attachedEvent: ?{
|
||||
detach: () => void,
|
||||
};
|
||||
|
@ -2228,6 +2229,7 @@ class AnimatedEvent {
|
|||
if (config.listener) {
|
||||
this.__addListener(config.listener);
|
||||
}
|
||||
this._callListeners = this._callListeners.bind(this);
|
||||
this._attachedEvent = null;
|
||||
this.__isNative = shouldUseNativeDriver(config);
|
||||
|
||||
|
@ -2281,9 +2283,9 @@ class AnimatedEvent {
|
|||
};
|
||||
}
|
||||
|
||||
_callListeners = (...args) => {
|
||||
_callListeners(...args) {
|
||||
this._listeners.forEach(listener => listener(...args));
|
||||
};
|
||||
}
|
||||
|
||||
_validateMapping() {
|
||||
const traverse = (recMapping, recEvt, key) => {
|
||||
|
|
Loading…
Reference in New Issue