-
Type: Sub-task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
Description
Create subclasses for all the driver classes that have async methods and handle both callback and promise returning support
AC
- Create wrappers that handle overload logic (options are optional usually)
- If callback is provided use callbackify if possible to wrap the driver's API
- When we are returning an instance of our own class ensure you capture the result and return and instance of the LegacyX version of it.
- Add helper [Symbol.for('@@mdb.callback.toLegacy')] method to the prototype of each legacy class
- overload the constructor to handle creating a new legacy instance from a baseClass instance
Test AC
- Cover methods that convert to a legacy type with unit tests that prove we always convert to the legacy version of a class