Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Correct type definition for .on #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { EmitterSubscription } from 'react-native';

declare module "react-native-audio-record" {
export interface IAudioRecord {
init: (options: Options) => void
start: () => void
stop: () => Promise<string>
on: (event: "data", callback: (data: string) => void) => void
on: (event: "data", callback: (data: string) => void) => EmitterSubscription
}

export interface Options {
Expand Down