You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Variable linesHtml has type string | TrustedHTML so you only need casting to string.
Assignment element.innerHTML = linesHtml as string; works properly.
The reason for this is, that the casting trick through unknown requires the variable type to be exactlyTrustedHTML(and it's an union in your case).
Assignment element.innerHTML = linesHtml as string; works properly.
Pretty sure that I have tried this but without success. Tho, I might have been on a wrong version of tsec - the yarn upgrade trick seems to be buggy and we are kinda desperate for #17. Folks keep getting a wrong version of tsec and aren't happy with tsec at all
I think I figured it out. The latest version of tsec seems to have lost the postinstall script that allows it to build, so even with the upgrade, it is still running old code. I've raised the issue internally and we'll work on a fix.
Activity
Siegrift commentedon Nov 30, 2020
This is intended.
Variable
linesHtmlhas typestring | TrustedHTMLso you only need casting tostring.Assignment
element.innerHTML = linesHtml as string;works properly.The reason for this is, that the casting trick through
unknownrequires the variable type to be exactlyTrustedHTML(and it's an union in your case).jrieken commentedon Nov 30, 2020
Pretty sure that I have tried this but without success. Tho, I might have been on a wrong version of
tsec- the yarn upgrade trick seems to be buggy and we are kinda desperate for #17. Folks keep getting a wrong version of tsec and aren't happy with tsec at allengelsdamien commentedon Dec 7, 2020
I think I figured it out. The latest version of tsec seems to have lost the postinstall script that allows it to build, so even with the upgrade, it is still running old code. I've raised the issue internally and we'll work on a fix.
jrieken commentedon Dec 9, 2020
Oh, that explains a lot