Allow a JS to dispatch method calls based on argument types