Description
It's easy to make a call with a typo in the name of an option property, resulting in that option being ignored. We currently only check that the properties that are allowed have acceptable values. We could also check that the 'options' argument does not contain any unexpected arguments. Something like this : |
this._checkKeyParam(key);
for (const ky in options)
{ const val = options[ky]; if(ky == 'timeout') this._checkTimeoutOption(val); else if( ky =='transcoder') this._checkTranscoderOption(val); else throw new TypeError( 'unknown option '+ky+" : "+(val?val:"") ); }
this._checkCallbackParam(callback);|