Skip to content

Commit 306c8d6

Browse files
osdnkfacebook-github-bot
authored andcommitted
Back out "[react-native][PR] Allow Animation EndResult callback to return Promise"
Summary: Original commit changeset: 420d29d262b6 Reverts #25793 / D16515465 Union type property is not supported by codegen. We don't want to support unions yet and because the improvement is not that big and not yet published as stable for OSS (neither used anywhere internally) we can safely revert it. Reviewed By: RSNara Differential Revision: D16621228 fbshipit-source-id: 2fa416eef1ae353990860026ca97d2b0b429a852
1 parent f4f08d3 commit 306c8d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Libraries/Animated/src/NativeAnimatedModule.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {TurboModule} from '../../TurboModule/RCTExport';
1414
import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
1515

1616
type EndResult = {finished: boolean};
17-
type EndCallback = (result: EndResult) => void | Promise<void>;
17+
type EndCallback = (result: EndResult) => void;
1818

1919
export type EventMapping = {|
2020
nativeEventPath: Array<string>,

Libraries/Animated/src/animations/Animation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const NativeAnimatedHelper = require('../NativeAnimatedHelper');
1414
import type AnimatedValue from '../nodes/AnimatedValue';
1515

1616
export type EndResult = {finished: boolean};
17-
export type EndCallback = (result: EndResult) => void | Promise<void>;
17+
export type EndCallback = (result: EndResult) => void;
1818

1919
export type AnimationConfig = {
2020
isInteraction?: boolean,

0 commit comments

Comments
 (0)