Merge pull request #28037 from fhelwanger/expo-image-manipulator-optional-props

[expo] ImageManipulator height or width optional
This commit is contained in:
Benjamin Lichtman
2018-08-13 12:54:31 -07:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@@ -374,9 +374,12 @@ async () => {
};
async () => {
const result = await ImageManipulator.manipulate('url', [{
rotate: 90
}], {
const result = await ImageManipulator.manipulate('url', [
{ rotate: 90 },
{ resize: { width: 300 } },
{ resize: { height: 300 } },
{ resize: { height: 300, width: 300 } },
], {
compress: 0.75
});

View File

@@ -1519,7 +1519,7 @@ export namespace ImageManipulator {
type Action = Resize | Rotate | Flip | Crop;
interface Resize {
resize: { width: number, height: number };
resize: { width?: number, height?: number };
}
interface Rotate {