Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow type: saveToCameraRoll returns a string #15631

Closed
wants to merge 3 commits into from
Closed

Flow type: saveToCameraRoll returns a string #15631

wants to merge 3 commits into from

Conversation

maartenschumacher
Copy link
Contributor

@maartenschumacher maartenschumacher commented Aug 24, 2017

Updates the flow typing to return Promise<string> instead of Promise<Object>. To validate that it actually does return a string, see

resolve(assetURL.absoluteString);
and
resolve(assetURL.absoluteString);

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. GH Review: review-needed labels Aug 24, 2017
@pull-bot
Copy link

pull-bot commented Aug 24, 2017

Warnings
⚠️

📋 Test Plan - This PR appears to be missing a Test Plan.

@facebook-github-bot label Needs more information

Generated by 🚫 dangerJS

@@ -150,7 +150,7 @@ class CameraRoll {
static saveToCameraRoll(
tag: string,
type?: 'photo' | 'video',
): Promise<Object> {
): Promise<string> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string This type is incompatible with object type

@maartenschumacher
Copy link
Contributor Author

test plan: i'm getting the same 133 flow errors before and after this change...

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Aug 27, 2017
@facebook-github-bot
Copy link
Contributor

@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added GH Review: accepted and removed GH Review: review-needed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Aug 29, 2017
@facebook-github-bot
Copy link
Contributor

I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification.

@facebook-github-bot facebook-github-bot added Import Failed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Aug 29, 2017
@hramos
Copy link
Contributor

hramos commented Aug 30, 2017

re: unrelated Flow type errors, a fix should be landing soon

edit: actually, it's landed already 63f9901

@elicwhite
Copy link
Member

@shergin We should try to reland this?

@facebook-github-bot
Copy link
Contributor

@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

bartolkaruza pushed a commit to bartolkaruza/react-native-cameraroll that referenced this pull request Feb 23, 2019
Summary:
Updates the flow typing to return Promise\<string\> instead of Promise\<Object\>. To validate that it actually does return a string, see https://github.com/facebook/react-native/blob/6493a857542c0985470311511c1be80982fcd474/Libraries/CameraRoll/RCTCameraRollManager.m#L98 and https://github.com/facebook/react-native/blob/6493a857542c0985470311511c1be80982fcd474/Libraries/CameraRoll/RCTCameraRollManager.m#L116
Closes facebook/react-native#15631

Differential Revision: D5714842

Pulled By: shergin

fbshipit-source-id: fb141b014c262bc4fb44419515e56bbe0641d8bf
bartolkaruza pushed a commit to bartolkaruza/react-native-cameraroll that referenced this pull request Feb 24, 2019
Summary:
Updates the flow typing to return Promise\<string\> instead of Promise\<Object\>. To validate that it actually does return a string, see https://github.com/facebook/react-native/blob/6493a857542c0985470311511c1be80982fcd474/Libraries/CameraRoll/RCTCameraRollManager.m#L98 and https://github.com/facebook/react-native/blob/6493a857542c0985470311511c1be80982fcd474/Libraries/CameraRoll/RCTCameraRollManager.m#L116
Closes facebook/react-native#15631

Differential Revision: D5714842

Pulled By: shergin

fbshipit-source-id: fb141b014c262bc4fb44419515e56bbe0641d8bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants