Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promisifyMethod return object instead of array to allow for destructuring #1186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 16, 2022

  1. promisifyMethod return object instead of array

    Currently, if users do this:
    > const result =  await client.MyFunction(args) 
    The result will be equal to an array containing result, rawResponse, soapHeader, rawRequest, mtomAttachments. And if they want just the parsed JSON response they have to do result[0].
    
    This is fine. But if we make promisify return an object instead of an array, they could do this:
    > const { result } =  await client.MyFunction(args)
    anasik authored May 16, 2022
    Configuration menu
    Copy the full SHA
    59b75b8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a1875ec View commit details
    Browse the repository at this point in the history