Skip to content

Commit

Permalink
fix: add back missing constructor in type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetazzoni committed Mar 13, 2024
1 parent 810afa5 commit 4ea0d04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('SSE Lifecycle', () => {
expect(sse.readyState).toBe(sse.CLOSED);
});

it('should sent Last-Event-ID on reconnection', () => {
it('should send Last-Event-ID on reconnection', () => {
sse.stream();
expect(sse.xhr.setRequestHeader).toHaveBeenCalledTimes(0);
sse.xhr.responseText = 'id: event-1\ndata: Test message\n\n';
Expand Down
5 changes: 4 additions & 1 deletion types/sse.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export type SSE = {
/** Constructor. */
new (url: string, options?: SSEOptions): SSE;

/**
* - headers
*/
Expand Down Expand Up @@ -116,4 +119,4 @@ export type OnAbort = (event: SSEvent) => void;
* @return {SSE}
*/
export var SSE: SSE;
//# sourceMappingURL=sse.d.ts.map
//# sourceMappingURL=sse.d.ts.map

0 comments on commit 4ea0d04

Please sign in to comment.