Skip to content

Commit f4f2856

Browse files
committed
Add constants OPEN, CONNECTING, CLOSED to the class as well
1 parent 062961b commit f4f2856

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/reconnecting-eventsource.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ export default class ReconnectingEventSource implements EventSource {
5757
readonly OPEN = 1;
5858
readonly CLOSED = 2;
5959

60+
// Evidently these are to exist both on the class and the instance
61+
static readonly CONNECTING = 0;
62+
static readonly OPEN = 1;
63+
static readonly CLOSED = 2;
64+
6065
_eventSource: EventSource | null;
6166
_lastEventId: string | null;
6267
_timer: NodeJS.Timer | null;

0 commit comments

Comments
 (0)