mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-13 08:57:26 +08:00
[expo] Add missing PictureOptions props (#28860)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
3c5bd3938d
commit
63c9cf4b94
@@ -287,6 +287,30 @@ Camera.Constants.BarCodeType;
|
||||
}
|
||||
}} />);
|
||||
};
|
||||
async (camera: CameraObject) => {
|
||||
const picture = await camera.takePictureAsync({
|
||||
quality: 0.5,
|
||||
base64: true,
|
||||
exif: true
|
||||
});
|
||||
|
||||
picture.uri;
|
||||
picture.width;
|
||||
picture.height;
|
||||
picture.exif;
|
||||
picture.base64;
|
||||
|
||||
camera.takePictureAsync({
|
||||
quality: 1,
|
||||
onPictureSaved: pic => {
|
||||
pic.uri;
|
||||
pic.width;
|
||||
pic.height;
|
||||
pic.exif;
|
||||
pic.base64;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
async () => {
|
||||
const result = await DocumentPicker.getDocumentAsync();
|
||||
|
||||
3
types/expo/index.d.ts
vendored
3
types/expo/index.d.ts
vendored
@@ -769,6 +769,9 @@ export namespace Brightness {
|
||||
*/
|
||||
export interface PictureOptions {
|
||||
quality?: number;
|
||||
base64?: boolean;
|
||||
exif?: boolean;
|
||||
onPictureSaved?: (data: PictureResponse) => void;
|
||||
}
|
||||
|
||||
export interface PictureResponse {
|
||||
|
||||
Reference in New Issue
Block a user