Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript definitions file #30

Open
stefanfuchs opened this issue Aug 14, 2020 · 0 comments
Open

Typescript definitions file #30

stefanfuchs opened this issue Aug 14, 2020 · 0 comments

Comments

@stefanfuchs
Copy link

I've made a simple typescript definitions file, I tested with the basic examples and it is working fine.
It might be worth adding it to the lib as the index.d.ts file:

declare module 'opus-media-recorder' {
  
  declare class OpusMediaRecorder extends MediaRecorder {
    constructor(stream: MediaStream, options?: MediaRecorderOptions, workerOptions?: OpusMediaRecorderWorkerOptions)
  }

  export interface OpusMediaRecorderWorkerOptions {
    encoderWorkerFactory: () => Worker,
    OggOpusEncoderWasmPath: string,
    WebMOpusEncoderWasmPath: string,
  }

  export = OpusMediaRecorder
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant