react-native-branch-deep-linking-attribution
react-native-branch-deep-linking-attribution copied to clipboard
Bad Typescript definition for showShareSheet
Hi everyone,
i think the showShareSheet function of the BranchUniversalObject is not well defined in index.d.ts.
Current:
interface BranchUniversalObject {
ident: string;
showShareSheet: (
shareOptions?: BranchShareSheetOptions,
linkProperties?: BranchLinkProperties,
controlParams?: BranchLinkControlParams
) => void;
generateShortUrl: (
linkProperties: BranchLinkProperties,
controlParams: BranchLinkControlParams
) => void;
logEvent: (eventName: string, params?: BranchEventParams) => Promise<null>;
release: () => void;
}
Should be something like (not sure about typing):
interface BranchUniversalObject {
ident: string;
showShareSheet: (
shareOptions?: BranchShareSheetOptions,
linkProperties?: BranchLinkProperties,
controlParams?: BranchLinkControlParams
) => Promise<{channel: string, completed: boolean, error: string | null}>;
generateShortUrl: (
linkProperties: BranchLinkProperties,
controlParams: BranchLinkControlParams
) => Promise<{url: string}>;
logEvent: (eventName: string, params?: BranchEventParams) => Promise<null>;
release: () => void;
}
generateShortUrl is probably not well defined too, but i don't use it so i don't know exactly if this is the good typing.
Can you correct this please?