-
Notifications
You must be signed in to change notification settings - Fork 6
More specific types #21
Copy link
Copy link
Open
Labels
Description
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
Reactions are currently unavailable