You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TS2322: Type '() => WebSocket' is not assignable to type '() => IStompSocket'.
Call signature return types 'WebSocket' and 'IStompSocket' are incompatible.
The types of 'onmessage' are incompatible between these types.
Type '((this: WebSocket, ev: MessageEvent<any>) => any) | null' is not assignable to type '((ev: IStompSocketMessageEvent) => any) | null | undefined'.
Type '(this: WebSocket, ev: MessageEvent<any>) => any' is not assignable to type '(ev: IStompSocketMessageEvent) => any'.
Types of parameters 'ev' and 'ev' are incompatible.
Type 'IStompSocketMessageEvent' is missing the following properties from type 'MessageEvent<any>': lastEventId, origin, ports, source, and 23 more.
It seems that my typescript configuration expects IStompSocketMessageEvent to contain a lot more fields than data?: string | ArrayBuffer; to be compatible with MessageEvent from lib.dom.d.ts.
How can I work around this issue?
The text was updated successfully, but these errors were encountered:
TS2322: Type 'WebSocket' is not assignable to type 'IStompSocket'.
Types of property 'onmessage' are incompatible.
Type '((this: WebSocket, ev: MessageEvent<any>) => any) | null' is not assignable to type '((ev: IStompSocketMessageEvent) => any) | null | undefined'.
Type '(this: WebSocket, ev: MessageEvent<any>) => any' is not assignable to type '(ev: IStompSocketMessageEvent) => any'.
Types of parameters 'ev' and 'ev' are incompatible.
Type 'IStompSocketMessageEvent' is missing the following properties from type 'MessageEvent<any>': lastEventId, origin, ports, source, and 23 more.
Hello,
I recently decided to upgrade to stompjs 7 from 5.4.4, and typescript doesn't like the following code:
The compiler error is the following:
It seems that my typescript configuration expects
IStompSocketMessageEvent
to contain a lot more fields thandata?: string | ArrayBuffer;
to be compatible withMessageEvent
fromlib.dom.d.ts
.How can I work around this issue?
The text was updated successfully, but these errors were encountered: