Skip to content

Commit dda9499

Browse files
Merge pull request #712 from romanlitvin/Fix-type-definition
Fix BranchUniversalObject showShareSheet return type definition
2 parents a81feab + e6cdcc4 commit dda9499

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/index.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,25 @@ interface BranchLinkControlParams {
276276
$samsung_url?: string;
277277
}
278278

279+
interface BranchShareSuccess {
280+
completed: true;
281+
error: null;
282+
channel: string;
283+
}
284+
285+
interface BranchShareFailure {
286+
completed: false;
287+
error: null | string;
288+
channel: null;
289+
}
290+
279291
interface BranchUniversalObject {
280292
ident: string;
281293
showShareSheet: (
282294
shareOptions?: BranchShareSheetOptions,
283295
linkProperties?: BranchLinkProperties,
284296
controlParams?: BranchLinkControlParams
285-
) => void;
297+
) => Promise<BranchShareSuccess | BranchShareFailure>;
286298
generateShortUrl: (
287299
linkProperties: BranchLinkProperties,
288300
controlParams: BranchLinkControlParams

0 commit comments

Comments
 (0)