Remix.run Logo
Waterluvian 13 hours ago

I’m so frustrated by satisfies because it eliminates optional properties.

I want an object of ‘LayerConfig’ elements where each key is the name of a possible layer. Without ‘satisfies’ I have to name every layer twice in my config. But with it, I can’t have optional properties (eg. Half the layers are fine with the default values for some properties).

The best I’ve found is a hack that uses a function. But this whole thing where my key literals widen into “string” is a constant annoyance to otherwise very elegant code.

iddan 12 hours ago | parent [-]

Then either make the properties optional or use Partial on the type you are satisfying