This PR adds the initial implementation of NodeMWP. NodeMWP stands for NodeMediaWiki: Promisified. Which, as the name suggests, is a wrapper for NodeMW but with promisified functions. The class extends Bot, and overrides necessary functions with a promisified version.
While I should manually specify the return type of the promisified functions (via promisify<type, type2, return>(...)), the library actually seems to provide the proper typings for parameters. And I would rather keep the return types as unknown to ensure that proper checks occur on the result (since it could be a multitude of things)
This PR adds the initial implementation of NodeMWP. NodeMWP stands for NodeMediaWiki: Promisified. Which, as the name suggests, is a wrapper for NodeMW but with promisified functions. The class extends
Bot
, and overrides necessary functions with a promisified version.While I should manually specify the return type of the promisified functions (via
promisify<type, type2, return>(...)
), the library actually seems to provide the proper typings for parameters. And I would rather keep the return types as unknown to ensure that proper checks occur on the result (since it could be a multitude of things)