---
layout: "default"
title: "Optional"
description: "Swift documentation for enum 'Optional'."
keywords: "Optional,enum,swift,documentation,flatMap,getMirror,map,debugDescription"
root: "/v1.2"
---

<div class="intro-declaration"><code class="language-swift">enum Optional&lt;T&gt;</code></div>


<table class="standard">
<tr>
<th id="inheritance">Inheritance</th>
<td>
<code class="inherits">DebugPrintable, NilLiteralConvertible, Reflectable</code>
<span class="viz"><a href="hierarchy/">View Protocol Hierarc