mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
de667fffa4
Summary: For some reason the specs were internal, but the native impl is still in github. So let's move these to github for consistency. Changelog: [Internal] Reviewed By: hramos Differential Revision: D21419934 fbshipit-source-id: f2c4486edca43c4348f3a3c6ce98f76a322bab0b
52 lines
1.0 KiB
JavaScript
52 lines
1.0 KiB
JavaScript
/**
|
|
* (c) Facebook, Inc. and its affiliates. Confidential and proprietary.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {TurboModule} from '../TurboModule/RCTExport';
|
|
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
|
|
|
type Options = {|
|
|
+offset: {|
|
|
+x: number,
|
|
+y: number,
|
|
|},
|
|
+size: {|
|
|
+width: number,
|
|
+height: number,
|
|
|},
|
|
+displaySize?: ?{|
|
|
+width: number,
|
|
+height: number,
|
|
|},
|
|
/**
|
|
* Enum with potential values:
|
|
* - cover
|
|
* - contain
|
|
* - stretch
|
|
* - center
|
|
* - repeat
|
|
*/
|
|
+resizeMode?: ?string,
|
|
+allowExternalStorage?: boolean,
|
|
|};
|
|
|
|
export interface Spec extends TurboModule {
|
|
+getConstants: () => {||};
|
|
+cropImage: (
|
|
uri: string,
|
|
// eslint-disable-next-line lint/react-native-modules
|
|
cropData: Options,
|
|
successCallback: (uri: string) => void,
|
|
errorCallback: (error: string) => void,
|
|
) => void;
|
|
}
|
|
|
|
export default (TurboModuleRegistry.getEnforcing<Spec>(
|
|
'ImageEditingManager',
|
|
): Spec);
|