Commit bb623e6
Allow Animation EndResult callback to return Promise (facebook#25793)
Summary:
I am sending an asynchronous function as callback to the `.start` method of `Animation.parallel([...]).start(callback)`. Flow does not like this, as the `EndCallback` type is saying that these callbacks must return `void`. Since my callback returns `Promise<void>` this results in an error.
Does it really matter what the callback returns?
## Changelog
[General] [Changed] - Make Animation EndCallback type allow any return value
Pull Request resolved: facebook#25793
Test Plan: I have run `yarn flow`, which reported no errors.
Reviewed By: cpojer
Differential Revision: D16515465
Pulled By: osdnk
fbshipit-source-id: 420d29d262b65471e6e1ad4b5a126bf7283362601 parent e78c013 commit bb623e6
File tree
2 files changed
+2
-2
lines changed- Libraries/Animated/src
- animations
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments