---
title: "replaceEmpty(with:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/optional/publisher-swift.struct/replaceempty(with:)"
---

# replaceEmpty(with:)

## Declaration

```swift
func replaceEmpty(with output: Optional<Wrapped>.Publisher.Output) -> Just<Wrapped>
```
