#How to create an object type which restrict its fields based on another object type?
4 messages · Page 1 of 1 (latest)
negated types aren't a thing in typescript, so there's no way to represent a value that can't have some specific property
there is a way to force such a check when assigning an object literal (using { property?: never }), but that's not actually a guarantee that the object doesn't have that property at runtime
I did it at the function type level. Thanks!