react-native-epson-escposprinter
Version:
A Turbo Module wrapper for the Epson ePOS Printer SDK.
20 lines (19 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.events = exports.NativeInterface = void 0;
var _reactNative = require("react-native");
// @ts-expect-error ts(7017)
const isTurboModuleEnabled = global.__turboModuleProxy != null;
const NativeInterface = exports.NativeInterface = isTurboModuleEnabled
// eslint-disable-next-line @typescript-eslint/no-var-requires
? require("./NativeEpsonEscposprinter").default : _reactNative.NativeModules.EpsonEscposprinter;
if (!NativeInterface) {
throw new Error("The package 'react-native-epson-escposprinter' 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");
}
const events = exports.events = isTurboModuleEnabled ? new _reactNative.NativeEventEmitter(NativeInterface) : _reactNative.DeviceEventEmitter;
//# sourceMappingURL=NativeInterface.js.map