</span>&lt;<span class="variable">A</span>&gt;(<span class="variable">on</span> <span class="variable">queue</span>: <span class="type">DispatchQueue</span> = .<span class="variable">main</span>, <span class="keyword">_</span> <span class="variable">handler</span>: <span class="attribute">@</span><span class="attribute">escaping</span> () <span class="keyword">throws</span> -&gt; <span class="type">A</span>) -&gt; <span class="type">Promise</span>&lt;<span class="type">A</span>&gt;</code></pre></body></html