Skip to content

Commit

Permalink
feat: Use std::shared_ptr<Promise<T>> instead of std::future<T> f…
Browse files Browse the repository at this point in the history
…or callbacks that return a value (#412)

* feat: Use `std::shared_ptr<Promise<T>>` instead of `std::future<T>` for callbacks that return a value

* Update FunctionType.ts

* chore: Lint

* Update Dispatcher.hpp

* chore: Update Podfile.lock
  • Loading branch information
mrousavy authored Dec 10, 2024
1 parent 978c833 commit ea2c070
Show file tree
Hide file tree
Showing 11 changed files with 330 additions and 302 deletions.
6 changes: 3 additions & 3 deletions docs/docs/types/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ These are all the types Nitro supports out of the box:
</tr>
<tr>
<td><code>(T...) =&gt; R</code></td>
<td><code>std::function&lt;std::future&lt;R&gt; (T...)&gt;</code></td>
<td></td>
<td></td>
<td><code>std::function&lt;std::shared_ptr&lt;Promise&lt;R&gt;&gt; (T...)&gt;</code></td>
<td><code>(T...) -&gt; <a href="./ios/core/Promise.swift">Promise&lt;T&gt;</a></code></td>
<td><code>(T...) -&gt; <a href="./android/src/main/java/com/margelo/nitro/core/Promise.kt">Promise&lt;T&gt;</a></code></td>
</tr>
<tr>
<td><code>Record&lt;string, T&gt;</code></td>
Expand Down
Loading

0 comments on commit ea2c070

Please sign in to comment.