---
title: "firstIndex(where:)"
framework: swift-package-manager
role: symbol
role_heading: Instance Method
path: "swift-package-manager/documentation/packageplugin/filelist/firstindex(where:)"
---

# firstIndex(where:)

Inherited from Collection.firstIndex(where:).

## Declaration

```swift
func firstIndex(where predicate: (Self.Element) throws -> Bool) rethrows -> Self.Index?
```
