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
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
REQUIREDheaders for the api (with compatibility with older versions of the protocol), and also specify the types for each type of message.For example
SEND:Versions
node-stomp-protocol: 0.3.8