Skip to content

Commit

Permalink
Merge pull request #43 from caugner/patch-1
Browse files Browse the repository at this point in the history
fix: mark SSEOptions properties as optional
  • Loading branch information
mpetazzoni authored Nov 10, 2023
2 parents 83b565d + 9314442 commit 6dbca90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions lib/sse.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ export { SSE };
*/
/**
* @typedef {Object} SSEOptions
* @property {SSEHeaders} headers - headers
* @property {string} payload - payload as a string
* @property {string} method - HTTP Method
* @property {boolean} withCredentials - flag, if credentials needed
* @property {boolean} debug - debugging flag
* @property {SSEHeaders} [headers] - headers
* @property {string} [payload] - payload as a string
* @property {string} [method] - HTTP Method
* @property {boolean} [withCredentials] - flag, if credentials needed
* @property {boolean} [debug] - debugging flag
*/
/**
* @typedef {Object} _SSEvent
Expand Down
12 changes: 6 additions & 6 deletions types/sse.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ export type SSEOptions = {
/**
* - headers
*/
headers: SSEHeader;
headers?: SSEHeader;
/**
* - payload as a string
*/
payload: string;
payload?: string;
/**
* - HTTP Method
*/
method: string;
method?: string;
/**
* - flag, if credentials needed
*/
withCredentials: boolean;
withCredentials?: boolean;
/**
* - debugging flag
*/
debug: boolean;
debug?: boolean;
};
export type _SSEvent = {
id: string;
Expand Down Expand Up @@ -94,4 +94,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 6dbca90

Please sign in to comment.