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

# init(upstream:output:)

Creates a publisher that emits a Boolean value when it receives a specific element from its upstream publisher.

## Declaration

```swift
init(upstream: Upstream, output: Upstream.Output)
```

## Parameters

- `upstream`: The publisher from which this publisher receives elements.
- `output`: The element to match in the upstream publisher.
