You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be possible. We can cross-reference the values of the required and optional parameters lists with the parameters on the method implementation to ensure the required params are actually required and the optional ones are not.
e.g.:
constexecuteMethodMap={'/session/:sessionId/foo': {POST: {command: 'doFoo',payloadParams: {required: ['a','b'],optional: ['c']}}}}asconstsatisfiesExecuteMethodMap<MyDriver>;// elsewhere...classMyDriverextendsBaseDriver<SomeConstraints>{staticexecuteMethodMap=executeMethodMap;// required params come first, in order// then optional paramsasyncdoFoo(a: string,b: string,c?: string){// not an error// stuff}}// an error would occur if doFoo was:class{asyncdoFoo(a: string,b: string,c: string){// c should be optional per executeMethodMap// stuff}}
The text was updated successfully, but these errors were encountered:
This should be possible. We can cross-reference the values of the
required
andoptional
parameters lists with the parameters on the method implementation to ensure the required params are actually required and the optional ones are not.e.g.:
The text was updated successfully, but these errors were encountered: