UNPKG

@react-native-drivekit/trip-simulator

Version:
28 lines (26 loc) 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.start = start; exports.stop = stop; var _reactNative = require("react-native"); const LINKING_ERROR = `The package '@react-native-drivekit/trip-simulator' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n'; // @ts-expect-error const isTurboModuleEnabled = global.__turboModuleProxy != null; const DriveKitTripSimulatorModule = isTurboModuleEnabled ? require('./NativeTripSimulator').default : _reactNative.NativeModules.RNDriveKitTripSimulator; const DriveKitTripSimulator = DriveKitTripSimulatorModule ? DriveKitTripSimulatorModule : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); function start(presetTrip) { return DriveKitTripSimulator.start(presetTrip); } function stop() { return DriveKitTripSimulator.stop(); } //# sourceMappingURL=api.js.map