Closed turt2live closed 2 months ago
I believe the Element Web build error is failed (or lack of) branch matching to the react-sdk.
Sorry for the spam here. As is hopefully obvious from the commit history, I tried to use @types/serviceworker
and that promptly exploded in my face.
My vote is to give up for now and put a help wanted label on it.
My vote is to give up for now and put a help wanted label on it.
I don't really understand. If you're not going to keep working on the PR, could you close it please?
I'm not sure I understand the action requested here. Should the crypto indirection be removed?
As for closing the PR: I'm saying we give up on trying to get types to work, but the PR is required to work. I cannot commit to debugging the entire type system much further, so a help wanted issue feels like the correct approach.
I'm not sure I understand the action requested here. Should the crypto indirection be removed?
I'm suggesting that, rather than doing anything special for service workers, you change lines 19-21 to be:
export let crypto = globalThis.crypto;
export let subtleCrypto = crypto?.subtle ?? crypto?.webkitSubtle; // or just `crypto?.subtle`
export let TextEncoder = globalThis.TextEncoder;
... and be done.
As for closing the PR: I'm saying we give up on trying to get types to work, but the PR is required to work. I cannot commit to debugging the entire type system much further, so a help wanted issue feels like the correct approach.
oh right. Well, that was far from obvious from your comment :)
For https://github.com/element-hq/element-web/pull/27326
Checklist
public
/exported
symbols have accurate TSDoc documentation.