We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 675907b commit 66c0bf2Copy full SHA for 66c0bf2
tests/type-checks.ts
@@ -203,12 +203,16 @@ async function closureSoICanUseAwait() {
203
//
204
205
// Type round trips
206
+ // This tests that Local is the exact inverse of Remote for objects:
207
assert<
208
IsExact<
209
Comlink.Local<Comlink.Remote<Comlink.ProxyMarked>>,
210
Comlink.ProxyMarked
211
>
212
>(true);
213
+ // This tests that Local is the exact inverse of Remote for functions, with one difference:
214
+ // The local version of a remote function can be either implemented as a sync or async function,
215
+ // because Remote<T> always makes the function async.
216
217
218
Comlink.Local<Comlink.Remote<(a: number) => string>>,
0 commit comments