diff --git a/assets/js/phoenix/longpoll.js b/assets/js/phoenix/longpoll.js index 517bf0f2ca..f594f41c95 100644 --- a/assets/js/phoenix/longpoll.js +++ b/assets/js/phoenix/longpoll.js @@ -29,6 +29,7 @@ export default class LongPoll { this.reqs = new Set() this.awaitingBatchAck = false this.currentBatch = null + /** @type {ReturnType | null} */ this.currentBatchTimer = null this.batchBuffer = [] this.onopen = function (){ } // noop diff --git a/priv/static/types/longpoll.d.ts b/priv/static/types/longpoll.d.ts index 5abaf8294b..50f8196f7e 100644 --- a/priv/static/types/longpoll.d.ts +++ b/priv/static/types/longpoll.d.ts @@ -7,7 +7,8 @@ export default class LongPoll { reqs: Set; awaitingBatchAck: boolean; currentBatch: any[] | null; - currentBatchTimer: NodeJS.Timeout | null; + /** @type {ReturnType | null} */ + currentBatchTimer: ReturnType | null; batchBuffer: any[]; onopen: () => void; onerror: () => void; diff --git a/priv/static/types/longpoll.d.ts.map b/priv/static/types/longpoll.d.ts.map index 6aa98bbe12..5b5cc51902 100644 --- a/priv/static/types/longpoll.d.ts.map +++ b/priv/static/types/longpoll.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"longpoll.d.ts","sourceRoot":"","sources":["../../../assets/js/phoenix/longpoll.js"],"names":[],"mappings":"AAiBA;IAEE,2CAsBC;IAlBG,8BAAmE;IAErE,cAAoB;IACpB,WAAiB;IACjB,uBAAyB;IACzB,eAAqB;IACrB,0BAA6B;IAC7B,2BAAwB;IACxB,yCAA6B;IAC7B,mBAAqB;IACrB,mBAA4B;IAC5B,oBAA6B;IAC7B,sBAA+B;IAC/B,oBAA6B;IAC7B,kBAAoD;IACpD,cAA0C;IAK5C,sCAKC;IAED,mBAEC;IAED,2DAGC;IAED,kBAGC;IAED,oBAA2G;IAE3G,aAiEC;IAMD,sBAaC;IAED,gDAkBC;IAED,mDAYC;IAED,sFAWC;CACF"} \ No newline at end of file +{"version":3,"file":"longpoll.d.ts","sourceRoot":"","sources":["../../../assets/js/phoenix/longpoll.js"],"names":[],"mappings":"AAiBA;IAEE,2CAuBC;IAnBG,8BAAmE;IAErE,cAAoB;IACpB,WAAiB;IACjB,uBAAyB;IACzB,eAAqB;IACrB,0BAA6B;IAC7B,2BAAwB;IACxB,mDAAmD;IACnD,mBADW,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAClB;IAC7B,mBAAqB;IACrB,mBAA4B;IAC5B,oBAA6B;IAC7B,sBAA+B;IAC/B,oBAA6B;IAC7B,kBAAoD;IACpD,cAA0C;IAK5C,sCAKC;IAED,mBAEC;IAED,2DAGC;IAED,kBAGC;IAED,oBAA2G;IAE3G,aAiEC;IAMD,sBAaC;IAED,gDAkBC;IAED,mDAYC;IAED,sFAWC;CACF"} \ No newline at end of file