---
title: XCTNSPredicateExpectation.Handler
framework: xctest
role: symbol
role_heading: Type Alias
path: xctest/xctnspredicateexpectation/handler-swift.typealias
---

# XCTNSPredicateExpectation.Handler

A handler XCTest calls when evaluating the predicate returns true.

## Declaration

```swift
typealias Handler = @Sendable () -> Bool
```

## Return Value

Return Value Your custom handler should return true if the expectation is considered fulfilled, otherwise false.

## See Also

### Handling Predicate Resolution

- [handler](xctest/xctnspredicateexpectation/handler-swift.property.md)
