---
title: "init(upstream:predicate:)"
framework: combine
role: symbol
role_heading: Initializer
path: "combine/publishers/trydropwhile/init(upstream:predicate:)"
---

# init(upstream:predicate:)

Creates a publisher that omits elements from an upstream publisher until a given error-throwing closure returns false.

## Declaration

```swift
init(upstream: Upstream, predicate: @escaping (Publishers.TryDropWhile<Upstream>.Output) throws -> Bool)
```

## Parameters

- `upstream`: The publisher from which this publisher receives elements.
- `predicate`: The error-throwing closure that indicates whether to drop the element.
