Rich Harris

Results 788 comments of Rich Harris

@dummdidumm do we want to try and get this into 5.0, or should we close it for now?

It looks like this breaks a bunch of tests. It's not totally clear what's going on here — if you're still interested in working on this, mind adding a test...

Closing per https://github.com/sveltejs/svelte/pull/11665#issuecomment-2156168499

No, and I'm still not fully clear on the benefits to be honest. Can't we just use spread attributes here?

Note: we should keep the existing behaviour when using `createClassComponent` and `asClassComponent`

Ah, the TypeScript thing is a nuisance. Wouldn't be the first time it's constrained our API design. I do think it's important for clarity that state/derived fields are declared consistently...

I'm saying we turn this... ```js class Doubler { result = $derived(); constructor(fn) { this.result = 2 * fn(); } } ``` ...into this: ```js class Doubler { #result =...

No, we wouldn't allow that. It would only be permitted in this case. Yes it'd be inconsistent but the only way to not introduce any inconsistency at all is to...

We definitely don't want to do that. In the vast majority of cases, if someone assigns to a derived value it's a mistake, and if we start to allow expressions...

my thoughts exactly! tbd whether i'll make it tonight. not sure what the docs story is. I feel like it ought to be possible to do at *least* what JSDocs...