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

Type Definition Error in AMQPView Class #125

Open
kileha3 opened this issue Dec 8, 2024 · 0 comments
Open

Type Definition Error in AMQPView Class #125

kileha3 opened this issue Dec 8, 2024 · 0 comments

Comments

@kileha3
Copy link

kileha3 commented Dec 8, 2024

When using @cloudamqp/amqp-client, there's a TypeScript compilation error in the type definitions file at node_modules/@cloudamqp/amqp-client/types/amqp-view.d.ts. The error occurs on line 8 where the AMQPView class extends DataView. TypeScript reports error TS2508: "No base constructor has the specified number of type arguments."

Technical Details:

  • Error Code: TS2508
  • File: node_modules/@cloudamqp/amqp-client/types/amqp-view.d.ts
  • Line: 8
  • Problematic Code: export declare class AMQPView extends DataView

The error occurs because the code attempts to extend JavaScript's built-in DataView class as if it accepts type parameters, which it doesn't. The DataView interface is part of TypeScript's lib.es5.d.ts definitions and is defined as a class without any type parameters.

To resolve this issue, the type definition should be modified to extend DataView without any type arguments, maintaining consistency with the standard JavaScript DataView implementation.

Environment:

  • Package: @cloudamqp/amqp-client
  • TypeScript: Compilation targets ES5 or higher
  • Error reproducible in strict type-checking mode
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

No branches or pull requests

1 participant