mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 19:12:20 +08:00
Merge pull request #26305 from philnova/master
Put openURL under CustomTabs namespace
This commit is contained in:
4
types/react-native-custom-tabs/index.d.ts
vendored
4
types/react-native-custom-tabs/index.d.ts
vendored
@@ -19,4 +19,6 @@ export interface CustomTabsOptions {
|
||||
headers?: any;
|
||||
}
|
||||
|
||||
export function openURL(url: string, options?: CustomTabsOptions): Promise<boolean>;
|
||||
export namespace CustomTabs {
|
||||
function openURL(url: string, options?: CustomTabsOptions): Promise<boolean>;
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ const rnt: ReactNativeCustomTabs.CustomTabsOptions = {
|
||||
enableDefaultShare: true,
|
||||
};
|
||||
|
||||
const url: Promise<boolean> = ReactNativeCustomTabs.openURL('testurl.com', rnt);
|
||||
const url: Promise<boolean> = ReactNativeCustomTabs.CustomTabs.openURL('testurl.com', rnt);
|
||||
|
||||
Reference in New Issue
Block a user