forked from bitlab-code/react-native-image-manipulator
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typescript module declarations improved.
- Loading branch information
1 parent
acbc1de
commit 291c994
Showing
4 changed files
with
51 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
declare const RNImageManipulator: any; | ||
export declare type RNImageManipulatorResult = { | ||
uri: string; | ||
width: number; | ||
height: number; | ||
base64?: string; | ||
}; | ||
declare const RNImageManipulator: { | ||
manipulate: ( | ||
uri: string, | ||
actions: Array<{ | ||
resize?: {width?: number; height?: number}; | ||
rotate?: number; | ||
flip?: {vertical?: boolean; horizontal?: boolean}; | ||
crop?: { | ||
originX?: number; | ||
originY?: number; | ||
width?: number; | ||
height?: number; | ||
}; | ||
}>, | ||
saveOptions: { | ||
compress?: number; | ||
format?: 'jpeg' | 'png'; | ||
base64?: boolean; | ||
}, | ||
) => Promise<RNImageManipulatorResult>; | ||
}; | ||
export default RNImageManipulator; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
import {RNImageManipulatorResult} from './index'; | ||
import {RNImageManipulatorResult as ImageResult} from './index'; | ||
|
||
export declare type ImageResult = RNImageManipulatorResult; | ||
export declare type RNImageManipulatorResult = ImageResult; | ||
|
||
export declare function manipulate( | ||
uri: string, | ||
actions: Array<{ | ||
resize?: {width?: number; height?: number}; | ||
rotate?: number; | ||
flip?: {vertical?: boolean; horizontal?: boolean}; | ||
crop?: { | ||
originX?: number; | ||
originY?: number; | ||
width?: number; | ||
height?: number; | ||
}; | ||
}>, | ||
saveOptions: { | ||
compress?: number; | ||
format?: 'jpeg' | 'png'; | ||
base64?: boolean; | ||
}, | ||
): Promise<RNImageManipulatorResult>; | ||
declare const RNImageManipulator: { | ||
manipulate: ( | ||
uri: string, | ||
actions: Array<{ | ||
resize?: {width?: number; height?: number}; | ||
rotate?: number; | ||
flip?: {vertical?: boolean; horizontal?: boolean}; | ||
crop?: { | ||
originX?: number; | ||
originY?: number; | ||
width?: number; | ||
height?: number; | ||
}; | ||
}>, | ||
saveOptions: { | ||
compress?: number; | ||
format?: 'jpeg' | 'png'; | ||
base64?: boolean; | ||
}, | ||
) => Promise<RNImageManipulatorResult>; | ||
}; | ||
export default RNImageManipulator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters