Once #24 is done and we can use npm for versioning, breaking changes will become less scary. With that out of the way, I propose we implement an opt-in (maybe as a plugin?) object mode for endpoints' arguments, as follows:
// object mode disabled
function logIn(username: string, password: string) { /* stuff */ }
// object mode enabled
function logIn(args: { username: string, password: string }) { /* stuff */ }
By doing so, breaking changes can be more easily detected and fixed: imagine the logIn function changes, so that it starts to receive a username and a token, both strings. Without object mode, the change wouldn't be detected by type systems (as password and token have the same type), introducing subtle bugs.
Another kind of bug easily introduced without object mode but avoided with it, is based on the fact that arguments order matter: switching arguments of the same type (e.g. logIn(password, username)) is easily done and hardly detectable.
Any thoughts?