import { NativeModulesProxy, EventEmitter, Subscription } from 'expo-modules-core'; // Import the native module. On web, it will be resolved to ReactNativeDetectNotePitch.web.ts // and on native platforms to ReactNativeDetectNotePitch.ts import ReactNativeDetectNotePitchModule from './ReactNativeDetectNotePitchModule'; import ReactNativeDetectNotePitchView from './ReactNativeDetectNotePitchView'; import { ChangeEventPayload, ReactNativeDetectNotePitchViewProps } from './ReactNativeDetectNotePitch.types'; // Get the native constant value. export const PI = ReactNativeDetectNotePitchModule.PI; export function hello(): string { return ReactNativeDetectNotePitchModule.hello(); } export async function setValueAsync(value: string) { return await ReactNativeDetectNotePitchModule.setValueAsync(value); } const emitter = new EventEmitter(ReactNativeDetectNotePitchModule ?? NativeModulesProxy.ReactNativeDetectNotePitch); export function addChangeListener(listener: (event: ChangeEventPayload) => void): Subscription { return emitter.addListener('onChange', listener); } export { ReactNativeDetectNotePitchView, ReactNativeDetectNotePitchViewProps, ChangeEventPayload };