Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Incorrect typedefs #299

@a-ogilvie

Description

@a-ogilvie

I found a typedef that does not match the actual function that it describes.

From /lib/list.js:

  getContacts(id, options) {
    if (!id) {
      return Promise.reject(new Error('id parameter must be provided.'))
    }

    return this.client.apiRequest({
      method: 'GET',
      path: `/contacts/v1/lists/${id}/contacts/all`,
      qs: options,
      qsStringifyOptions: { indices: false },
    })
  }

From /typescript/list.ts:

  getContacts(id: number): RequestPromise

Note that the actual function takes two arguments, but the typedef only describes one argument. This causes an error to be thrown when passing an options argument to `getContacts.

Are there other functions where the typedef is incorrect? Should I open a PR to bring these in sync?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions