mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a7a7970e54
Summary: This is another step in moving RN towards standard path-based requires, updating more code to use path-based requires. See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail. ## Changelog [General] [Changed] - Replace more Haste imports with path-based imports Pull Request resolved: https://github.com/facebook/react-native/pull/25001 Differential Revision: D15467829 Pulled By: cpojer fbshipit-source-id: 58c364bb4c1c757689907d5ed0d0f3fac0e22f3f
38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {TurboModule} from '../TurboModule/RCTExport';
|
|
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
|
import Platform from '../Utilities/Platform';
|
|
|
|
export interface Spec extends TurboModule {
|
|
// Common interface
|
|
+getInitialURL: () => Promise<string>;
|
|
+canOpenURL: (url: string) => Promise<boolean>;
|
|
+openURL: (url: string) => Promise<void>;
|
|
+openSettings: () => Promise<void>;
|
|
|
|
// Android only
|
|
+sendIntent: (
|
|
action: string,
|
|
extras: ?Array<{key: string, value: string | number | boolean}>,
|
|
) => Promise<void>;
|
|
|
|
// Events
|
|
+addListener: (eventName: string) => void;
|
|
+removeListeners: (count: number) => void;
|
|
}
|
|
|
|
export default (Platform.OS === 'ios'
|
|
? TurboModuleRegistry.getEnforcing<Spec>('LinkingManager')
|
|
: TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid'));
|