Skip to content

More specific types #21

@sywka

Description

@sywka

Description

Why is StompHeaders an optional argument in all methods? By specification in many methods, headings are REQUIRED.

So, it is probably better to make the REQUIRED headers for the api (with compatibility with older versions of the protocol), and also specify the types for each type of message.

For example SEND:

interface StompSendHeaders extends StompHeaders {
  destination: string;
  transaction?: string;
}

public send(headers: StompSendHeaders, body?: string): void {
    console.log("Send!", body, headers);
  }

Versions

node-stomp-protocol: 0.3.8

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions