---
title: "init(_:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/optional/publisher-swift.struct/init(_:)"
---

# init(_:)

Creates a publisher to emit the value of the optional, or to finish immediately if the optional doesn’t have a value.

## Declaration

```swift
init(_ output: Optional<Wrapped>.Publisher.Output?)
```

## Parameters

- `output`: The result to deliver to each subscriber.
