---
title: keyPath
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/keypathcomparator/keypath
---

# keyPath

The key path that the comparator uses to compare properties.

## Declaration

```swift
@preconcurrency let keyPath: any PartialKeyPath<Compared> & Sendable
```

## See Also

### Inspecting Key Path Comparators

- [order](foundation/keypathcomparator/order.md)
