@linvix-sistemas/react-native-tectoysunmisdk
Version:
Pacote de comunicação com o hardware de Sunmi/Tectoy Automação, para efetuar impressão, comunicação com LCD entre outros.
49 lines (40 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
const {
TectoySunmiSdk
} = _reactNative.NativeModules;
const FecharApp = async () => {
try {
return await TectoySunmiSdk.Utilidades_FecharApp();
} catch (error) {
throw error;
}
};
const ModoFullScreen = async function () {
let ativar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
try {
return await TectoySunmiSdk.Utilidades_ModoFullScreen(ativar);
} catch (error) {
throw error;
}
};
const ReiniciarDispositivo = async function () {
let motivo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
try {
return await TectoySunmiSdk.Utilidades_ReiniciarDispositivo(motivo);
} catch (error) {
throw error;
}
};
const NativeModuleTectToySunmiUtilsSDK = {
FecharApp,
ModoFullScreen,
ReiniciarDispositivo
};
var _default = NativeModuleTectToySunmiUtilsSDK;
exports.default = _default;
//# sourceMappingURL=tectoysunmi-utils.js.map