diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..4bda900 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,28 @@ +export declare module 'react-native-audiowaveform' { + import { ComponentType } from 'react'; + import { NativeWaveType, WaveObjectPropsType } from 'react-native-audiowaveform'; + + const WaveForm: ComponentType; + export default WaveForm; +} + +export declare type NativeWaveType = { + componentID: number; +} & WaveObjectPropsType; + +export declare type WaveObjectPropsType = { + autoPlay: boolean; + play: boolean; + source: number; + stop: boolean; + style?: number | null; + waveFormStyle?: WaveformStyleType | null; + onPress?: (() => void) | null; + onFinishPlay?: (() => void) | null; + earpiece: boolean; +}; + +export declare type WaveformStyleType = { + scrubColor: string; + waveColor: string; +};