From 59507c811f1244349af77baf96144c3dffbc840e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Tue, 1 Dec 2020 18:18:58 +0100 Subject: [PATCH] Make type of array of objects compatible with JSDoc and TSDoc. The best TSDoc type is (Text|HTMLElement)[], but to JSDoc the array is not distributive. JSDoc prefers Text[]|HTMLElement[], but TSDoc rejects that syntax. In the end, both are fine with Array.. --- static/sfu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/sfu.js b/static/sfu.js index e464bd0..578783b 100644 --- a/static/sfu.js +++ b/static/sfu.js @@ -1446,7 +1446,7 @@ const urlRegexp = /https?:\/\/[-a-zA-Z0-9@:%/._\\+~#&()=?]+[-a-zA-Z0-9@:%/_\\+~# /** * @param {string} line - * @returns {(Text|HTMLElement)[]} + * @returns {Array.} */ function formatLine(line) { let r = new RegExp(urlRegexp);