ionic-audio icon indicating copy to clipboard operation
ionic-audio copied to clipboard

Remove deprecated argument from IonicAudioModule.forRoot in demo

Open lujakob opened this issue 8 years ago • 3 comments

After running the demo app the following Typescript error is thrown: Argument of type '{ provide: typeof AudioProvider; useFactory: any; }' is not assignable to parameter of type 'AudioProvider'. In the module definition the argument is of type AudioProvider, so I guess there have been changes and this is a leftover. I removed the arguments for the demo app.module definition to use the argument defaults instead (as it is seen in the installed npm package)

lujakob avatar Feb 27 '17 12:02 lujakob

@lujakob can you explain me why this is also included

/**
 * Sample custom factory function to use with ionic-audio
 */
export function myCustomAudioProviderFactory() {
  return new WebAudioProvider();
}

do we need it? and second thing AudioProvider in import?

sfaizanh avatar Feb 27 '17 19:02 sfaizanh

export function myCustomAudioProviderFactory is not needed but added by the author as an example for adding a custom AudioProvider. And as it's a demo, I didn't want to remove it (I wouldn't want to take the authority, I just fixed an error). AudioProvider in the import is unused as well and can be removed, correct.

lujakob avatar Feb 27 '17 20:02 lujakob

Thanks

sfaizanh avatar Feb 27 '17 20:02 sfaizanh