Skip to content

Commit

Permalink
Merge pull request goodatlas#25 from is343/master
Browse files Browse the repository at this point in the history
add typescript type definitions
  • Loading branch information
is343 authored Aug 28, 2019
2 parents 7381285 + 29bdbd2 commit b5a32de
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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
}

export interface Options {
sampleRate: number
/**
* - `1 | 2`
*/
channels: number
/**
* - `8 | 16`
*/
bitsPerSample: number
/**
* - `6`
*/
audioSource?: number
wavFile: string
}

const AudioRecord: IAudioRecord

export default AudioRecord;
}

0 comments on commit b5a32de

Please sign in to comment.