diff --git a/types/react-native-custom-tabs/index.d.ts b/types/react-native-custom-tabs/index.d.ts index ed74ff4303..42fd1cdf78 100644 --- a/types/react-native-custom-tabs/index.d.ts +++ b/types/react-native-custom-tabs/index.d.ts @@ -19,4 +19,6 @@ export interface CustomTabsOptions { headers?: any; } -export function openURL(url: string, options?: CustomTabsOptions): Promise; +export namespace CustomTabs { + function openURL(url: string, options?: CustomTabsOptions): Promise; +} diff --git a/types/react-native-custom-tabs/react-native-custom-tabs-tests.ts b/types/react-native-custom-tabs/react-native-custom-tabs-tests.ts index 86dad3b3ee..f300f79d35 100644 --- a/types/react-native-custom-tabs/react-native-custom-tabs-tests.ts +++ b/types/react-native-custom-tabs/react-native-custom-tabs-tests.ts @@ -7,4 +7,4 @@ const rnt: ReactNativeCustomTabs.CustomTabsOptions = { enableDefaultShare: true, }; -const url: Promise = ReactNativeCustomTabs.openURL('testurl.com', rnt); +const url: Promise = ReactNativeCustomTabs.CustomTabs.openURL('testurl.com', rnt);