Skip to content

Commit

Permalink
Back out "[react-native][PR] Allow Animation EndResult callback to re…
Browse files Browse the repository at this point in the history
…turn 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
  • Loading branch information
osdnk authored and facebook-github-bot committed Aug 5, 2019
1 parent f4f08d3 commit 306c8d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Libraries/Animated/src/NativeAnimatedModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {TurboModule} from '../../TurboModule/RCTExport';
import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';

type EndResult = {finished: boolean};
type EndCallback = (result: EndResult) => void | Promise<void>;
type EndCallback = (result: EndResult) => void;

export type EventMapping = {|
nativeEventPath: Array<string>,
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Animated/src/animations/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const NativeAnimatedHelper = require('../NativeAnimatedHelper');
import type AnimatedValue from '../nodes/AnimatedValue';

export type EndResult = {finished: boolean};
export type EndCallback = (result: EndResult) => void | Promise<void>;
export type EndCallback = (result: EndResult) => void;

export type AnimationConfig = {
isInteraction?: boolean,
Expand Down

0 comments on commit 306c8d6

Please sign in to comment.