UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

31 lines (28 loc) • 819 B
import { NitroModules } from "react-native-nitro-modules"; import { assertLightSensorListener, assertUpdateInterval } from "./validate.native.js"; var hybrid; function native() { hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = NitroModules.createHybridObject("OneLightSensor"); return hybrid; } function isAvailable() { return native().isAvailable(); } function setUpdateInterval(intervalMs) { assertUpdateInterval(intervalMs); native().setUpdateInterval(intervalMs); } function addListener(listener) { assertLightSensorListener(listener); var remove = native().addListener(listener); return { remove: function remove1() { return remove(); } }; } var LightSensor = Object.freeze({ isAvailable, setUpdateInterval, addListener }); export { LightSensor }; //# sourceMappingURL=index.native.js.map