Skip to content

Commit

Permalink
Typing tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetazzoni committed Nov 8, 2023
1 parent f483e8e commit 53cd915
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/sse.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ var SSE = function (url, options) {
/** @type { {[key: string]: EventListener} } */
this.listeners = {};


/** @type {XMLHttpRequest} */
this.xhr = null;
/** @type {number} */
this.readyState = this.INITIALIZING;
/** @type {number} */
this.progress = 0;
Expand Down Expand Up @@ -285,11 +286,11 @@ if (typeof exports !== 'undefined') {
export { SSE };

/**
* @typedef { {[key: string]: string} } SSEHeader
* @typedef { {[key: string]: string} } SSEHeaders
*/
/**
* @typedef {Object} SSEOptions
* @property {SSEHeader} headers - headers
* @property {SSEHeaders} headers - headers
* @property {string} payload - payload as a string
* @property {string} method - HTTP Method
* @property {boolean} withCredentials - flag, if credentials needed
Expand Down

0 comments on commit 53cd915

Please sign in to comment.