mirror of
https://github.com/status-im/react-native-cameraroll.git
synced 2025-02-28 17:30:40 +00:00
Merge pull request #26 from iamolegga/typescript-fix
fix typescript declarations
This commit is contained in:
commit
bbd158014b
@ -5,6 +5,7 @@
|
|||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./js/CameraRoll.js",
|
"main": "./js/CameraRoll.js",
|
||||||
|
"types": "./typings/CameraRoll.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"test": "yarn validate:eslint && yarn validate:flow && yarn validate:typescript && yarn test:jest",
|
"test": "yarn validate:eslint && yarn validate:flow && yarn validate:typescript && yarn test:jest",
|
||||||
|
10
typings/CameraRoll.d.ts
vendored
10
typings/CameraRoll.d.ts
vendored
@ -27,7 +27,7 @@ export interface GetPhotosParams {
|
|||||||
after?: string,
|
after?: string,
|
||||||
groupTypes?: GroupType,
|
groupTypes?: GroupType,
|
||||||
groupName?: string,
|
groupName?: string,
|
||||||
assetType?: AssetType
|
assetType?: AssetType,
|
||||||
mimeTypes?: Array<string>,
|
mimeTypes?: Array<string>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,12 +72,12 @@ export interface CameraRollStatic {
|
|||||||
/**
|
/**
|
||||||
* Delete a photo from the camera roll or media library. photos is an array of photo uri's.
|
* Delete a photo from the camera roll or media library. photos is an array of photo uri's.
|
||||||
*/
|
*/
|
||||||
deletePhotos: (photos: Array<string>) => void,
|
deletePhotos: (photos: Array<string>) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the photo or video to the camera roll or photo library.
|
* Saves the photo or video to the camera roll or photo library.
|
||||||
*/
|
*/
|
||||||
saveToCameraRoll: (tag: string, type?: 'photo' | 'video') => Promise<string>;
|
saveToCameraRoll: (tag: string, type?: 'photo' | 'video') => Promise<string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a Promise with photo identifier objects from the local camera
|
* Returns a Promise with photo identifier objects from the local camera
|
||||||
@ -85,3 +85,7 @@ export interface CameraRollStatic {
|
|||||||
*/
|
*/
|
||||||
getPhotos: (params: GetPhotosParams) => Promise<PhotoIdentifiersPage>;
|
getPhotos: (params: GetPhotosParams) => Promise<PhotoIdentifiersPage>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let CameraRoll: CameraRollStatic;
|
||||||
|
|
||||||
|
export default CameraRoll;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user