DefinitelyTyped

Index

Variables

Interfaces

Variables

SockJS: SockJS

public CLOSED: number

public CLOSING: number

public CONNECTING: number

public OPEN: number

public onclose: (ev: SJSCloseEvent) => any

public onmessage: (ev: SJSMessageEvent) => any

public onopen: (ev: SJSOpenEvent) => any

public protocol: string

public readyState: number

public addEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public close(code?: number, reason?: string)

Parameters

  • code?: number optional
  • reason?: string optional

public dispatchEvent(evt: Event): boolean

Parameters

  • evt: Event

Returns

boolean

public removeEventListener(type: string, listener: EventListener, useCapture?: boolean)

Parameters

  • type: string
  • listener: EventListener
  • useCapture?: boolean optional

public send(data: any)

Parameters

  • data: any