Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: VaclavS16 <37083205+VaclavS16@users.noreply.github.com>
  • Loading branch information
mpetazzoni and VaclavS16 committed Nov 8, 2023
1 parent cdb9a03 commit 5471ff1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions types/sse.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
export type SSE = {
new (url: string, options?: SSEOptions): SSE;
/**
* - headers
*/
headers: string;
headers: SSEHeaders;
/**
* - payload as a string
*/
Expand All @@ -19,6 +20,12 @@ export type SSE = {
* - debugging flag
*/
debug: boolean;
FIELD_SEPARATOR: string;
listeners: Record<string, Function[]>;
xhr: XMLHttpRequest | null;
readyState: number;
progress: number;
chunk: string;
addEventListener: AddEventListener;
removeEventListener: RemoveEventListener;
dispatchEvent: DispatchEvent;
Expand All @@ -31,7 +38,7 @@ export type SSE = {
onerror: OnError;
onabort: OnAbort;
};
export type SSEHeader = {
export type SSEHeaders = {
[key: string]: string;
};
export type SSEOptions = {
Expand Down

0 comments on commit 5471ff1

Please sign in to comment.