DefinitelyTyped/types/react-native-share-extension/index.d.ts
Haseeb Majid 5eeffbdb87 Added react-native-share-extension (#41306)
* Added React Native Share Extension

* Fixed Linting Issues

Fixed linting issues, added tests.

* Fixed other linting issues

Data returns a promise.

* Removed Public from state

Removed public from state.
2020-01-02 15:56:33 -08:00

19 lines
529 B
TypeScript

// Type definitions for react-native-share-extension 2.0
// Project: https://github.com/alinz/react-native-share-extension
// Definitions by: Haseeb Majid <https://github.com/hmajid230>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface ShareData {
value: string;
type: 'text/plain' | 'images/*';
}
interface ShareExtension {
close(): void;
data(): Promise<ShareData>;
openURL(uri: string): void;
}
declare const RNShareExtension: ShareExtension;
export default RNShareExtension;