For Mauricio's code generator work
LLMs experience time like colorblindness - systematically wrong but feeling certain. Claude confidently says "last month" when it was 6 months ago, or "just discussed" when it was 3 conversations back.
Grand theories of software complexity (Simple Made Easy, Out of the Tarpit) create intellectual frameworks that let their adherents opt out of shared solutions while feeling superior about it.
The mechanism:
import { CachedFormula, Cell, Formula } from "@starbeam-lite/core"; | |
import { EventRecorder, TestScheduler } from "@workspace/test-utils"; | |
import { describe, expect, it } from "vitest"; | |
import { subscribe } from "../src/subtle"; | |
import { TAG } from "@starbeam-lite/shared"; | |
describe("subscribe", () => { | |
describe("equivalent to Signal.subtle.Watcher (ported tests)", () => { | |
it("should work", () => { | |
const events = new EventRecorder(); |
Broadly speaking, the idea is that you should be able to create an accessor
decorator that doesn't expose a setter.
I think the most natural way to express this is for the set
function returned by an accessor decorator to have a never
return type. The idea is that such a decorator would result in the type system treating the resulting field as if it was a manually written getter without a setter.
Here's an example scenario:
import { Friend } from "hypothetical-lib";
{ | |
"public": true | |
} |
A factory is a function that returns a new reactive object.
You can use a class as a factory, but it's not required. When you use a class as a factory, its constructor must take zero required arguments.