mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
The types `Options` and `MultiOptions` as well as `OpenReturn` and `ShareSingleReturn` are taken directly from7535726eb4/index.jsand have only have been transformed to interfaces. The signature of the `shareSingle` call is missing `social` in the official repo as well, but from the native code it becomes apearent that it is required:7535726eb4/ios/RNShare.m (L85-L122)
43 lines
696 B
TypeScript
43 lines
696 B
TypeScript
import Share from 'react-native-share';
|
|
|
|
// $ExpectType Promise<OpenReturn>
|
|
Share.open({
|
|
url: '',
|
|
message: '',
|
|
});
|
|
|
|
// $ExpectType Promise<OpenReturn>
|
|
Share.open({
|
|
title: '',
|
|
message: '',
|
|
urls: [],
|
|
});
|
|
|
|
// $ExpectType Promise<OpenReturn>
|
|
Share.open({
|
|
url: '',
|
|
type: '',
|
|
message: '',
|
|
title: '',
|
|
subject: '',
|
|
excludedActivityTypes: '',
|
|
showAppsToView: true,
|
|
});
|
|
|
|
// $ExpectType Promise<ShareSingleReturn>
|
|
Share.shareSingle({
|
|
url: '',
|
|
message: '',
|
|
social: 'facebook',
|
|
});
|
|
|
|
// $ExpectType Promise<ShareSingleReturn>
|
|
Share.shareSingle({
|
|
url: '',
|
|
type: '',
|
|
message: '',
|
|
title: '',
|
|
subject: '',
|
|
social: 'facebook',
|
|
});
|