1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-31 08:43:54 +00:00

fix: promise double wrap

This commit is contained in:
Andreas Coroiu
2025-11-03 12:05:04 +01:00
parent cf472fce0f
commit e788a9875e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
import { executeBatchCommands } from "./executor";
import { RpcError } from "./error";
import { executeBatchCommands } from "./executor";
import { BatchCommand, serializeSymbol } from "./protocol";
import { ReferenceStore } from "./reference-store";
@@ -126,7 +126,7 @@ describe("Batch executor", () => {
it("calls method fetched using symbol property", async () => {
const commands: BatchCommand[] = [
{ method: "get", propertySymbol: serializeSymbol(Symbol.dispose) },
{ method: "get", propertySymbol: serializeSymbol(Symbol.asyncDispose) },
{ method: "apply", args: [] },
];

View File

@@ -18,7 +18,7 @@ export type Transfer<T> = {
* Force a by-value snapshot transfer of this remote reference. Resolves to a serializable value.
* If the object is not serializable at runtime, this will throw.
*/
transfer: Promise<T>;
transfer: Resolved<T>;
};
export type RemoteReference<T> = Remote<T> & Transfer<T>;