Skip to content

[web-pubsub-express] TypeScript declaration of ConnectRequest interface wrong #24515

Open

Description

  • Package Name: @azure/web-pubsub-express
  • Package Version: 1.0.3
  • Operating system:
  • nodejs
    • version:
  • browser
    • name/version:
  • typescript
    • version: 4.9.3
  • Is the bug related to documentation in

Describe the bug
Attribute 'queries' of a ConnectRequest object is not available when using handleConnect event in a WebPubSubEventHandler.
The returned object has actually a query attribute instead of the queries one that is declared in the ConnectRequest interface (file web-pubsub-express.d.ts).

To Reproduce
Steps to reproduce the behavior:

  1. Declare a new WebPubSubEventHandler with an 'handleConnect' event.
  2. When a connection event arrives, the content of the 'ConnectRequest' object is not matching its interface described in web-pubsub-express.d.ts package generated file (see enclosed screenshots).

Workaround : replace 'queries' by 'query' attribute in webpubsub-express.d.ts (not recommended) or replace the 'ConnectRequest' object type in the declaration by 'any'.

Expected behavior
To be compliant with the documentation the returned object should have its attribute 'query' replaced by 'queries'. A fix is needed to comply with the documentation.

Screenshots

ConnectRequest object

ConnectRequest interface

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.WebPubSubbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions