diff --git a/types/react-native-share/index.d.ts b/types/react-native-share/index.d.ts index 0d615ced4b..2370b8afcd 100644 --- a/types/react-native-share/index.d.ts +++ b/types/react-native-share/index.d.ts @@ -2,14 +2,13 @@ // Project: https://github.com/react-native-community/react-native-share#readme // Definitions by: Mark Nelissen // pera +// MateusAndrade // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 declare namespace Share { function open(options: Options | MultipleOptions): Promise; - function shareSingle( - options: Options & { social: SupportedSocialApps } - ): Promise; + function shareSingle(options: Options & { social: SupportedSocialApps }): Promise; } export default Share; @@ -30,6 +29,7 @@ export interface Options { message?: string; title?: string; subject?: string; + filename?: string; excludedActivityTypes?: string; failOnCancel?: boolean; showAppsToView?: boolean; @@ -47,10 +47,10 @@ export interface MultipleOptions { } export type SupportedSocialApps = - | "facebook" - | "pagesmanager" - | "twitter" - | "whatsapp" - | "instagram" - | "googleplus" - | "email"; + | 'facebook' + | 'pagesmanager' + | 'twitter' + | 'whatsapp' + | 'instagram' + | 'googleplus' + | 'email'; diff --git a/types/react-native-share/react-native-share-tests.ts b/types/react-native-share/react-native-share-tests.ts index a5702a9b59..b6316311b9 100644 --- a/types/react-native-share/react-native-share-tests.ts +++ b/types/react-native-share/react-native-share-tests.ts @@ -40,3 +40,14 @@ Share.shareSingle({ subject: '', social: 'facebook', }); + +// $ExpectType Promise +Share.shareSingle({ + url: '', + type: '', + message: '', + title: '', + subject: '', + filename: 'test', + social: 'facebook', +});