Skip to content

Commit 520e4d6

Browse files
authored
Merge pull request GoogleChromeLabs#501 from xeoneux/patch-1
Fix return type for transfer method
2 parents 3b84342 + dfd386c commit 520e4d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comlink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ function processArguments(argumentList: any[]): [WireValue[], Transferable[]] {
468468
}
469469

470470
const transferCache = new WeakMap<any, Transferable[]>();
471-
export function transfer(obj: any, transfers: Transferable[]) {
471+
export function transfer<T>(obj: T, transfers: Transferable[]): T {
472472
transferCache.set(obj, transfers);
473473
return obj;
474474
}

0 commit comments

Comments
 (0)