The object type with known keys (strict overload).
The key of the property to compare.
A predicate for use with arrays of type T.
Use RecordCore.onKeyEqual instead or import as a R alias and R.onKeyEqual
// Strict object structure
const isAdmin = propEquals<User, 'role'>('role', 'admin');
const admins = users.filter(isAdmin);
Creates a predicate function that checks whether a given object's property equals the specified value.
Supports both strictly typed object structures and looser records with optional properties.
Useful for filtering arrays of objects based on property values.
The value type of the property (loose overload).
The key of the property to compare.
A predicate for use with arrays of type T.
Use RecordCore.onKeyEqual instead or import as a R alias and R.onKeyEqual
// Strict object structure
const isAdmin = propEquals<User, 'role'>('role', 'admin');
const admins = users.filter(isAdmin);
Creates a predicate function that checks whether a given object's property equals the specified value.
Supports both strictly typed object structures and looser records with optional properties.
Useful for filtering arrays of objects based on property values.