Skip to content

Conversation

EduardoRodriguesF
Copy link

What is the purpose of this pull request?

Improve the clients usability for TypeScript.

What problem is this solving?

Fix broken return types for MasterData client's scrollDocuments method.

This is the return type of scrollDocuments as is today:

interface Response<T> {
    mdToken: string
    data: T
}

However, according to the function signature and reinforced by the LSP, it shows an incorrect type and causes inaccurate type errors:

interface Response<T> {
    mdToken: string
    data: {
        mdToken: string
        data: T
    }
}

This PR fixes it so that the return type shows the correct output as the first snippet.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

@EduardoRodriguesF EduardoRodriguesF changed the title fix: masterdata scroll response typings are inaccurate Fix MasterData scrollDocuments incorrect return type May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant