mirror of
https://github.com/appium/appium.git
synced 2026-02-20 10:20:05 -06:00
The first arg of `PluginCommand` is a `NextPluginCallback` which now returns `Promise<unknown>` instead of `Promise<void>`, which was incorrect. We use `unknown` rather than `any` because it forces us to be explicit about the return value of `await next()` if we are to call it. Added a type `DriverCommandToPluginCommand` which essentially converts a `DriverCommand` to a `PluginCommand`. It's probably best used as a type guard or decorator, but it can "fill in the blanks" when overloading commands in a plugin. Also normalized some of the `TArgs`/`TReturn` stuff.