Closed CarsonF closed 4 months ago
Yeah, great point. "never
is assignable to anything"
Options:
undefined
to this key in the resulting object and make the type reflect that.unknown
and... not sure what the runtime should be here since unknown
doesn't really imply anything to me about this key in the resulting object. Other than maybe that it exists?I think the first option makes the most sense since I think that's kind of how you would instinctively use false
: as a way to remove a property (for instance after a ["*"]
splat spread).
Could we change the arg shape to reject false
?
https://github.com/edgedb/edgedb-js/blob/0bf404ec6e3479379417b234e0500e2f4b76310d/packages/generate/src/syntax/select.ts#L755-L755
| true
We fixed this issue with first @scotttrinh recommendation above. We don't return anymore "these keys" in the resulting objects.
Runtime omits
foo
from EdgeQL, but TS types it asnever
. This allows it to be compatible, somehow, with a type expecting that property.I think the type should be changed to
undefined
, or maybeunknown
instead?