Skip to main content
Module

x/earthstar/src/sync-fs/util.ts>getTupleWinners

A specification and Javascript library for building online tools you can truly call your own.
Go to Latest
function getTupleWinners
import { getTupleWinners } from "https://deno.land/x/earthstar@v9.3.3/src/sync-fs/util.ts";

Type Parameters

TypeA
TypeB

Parameters

zippedRecord: Record<string, [TypeA | null, TypeB | null]>
determineWinner: (a: TypeA | null, b: TypeB | null) => TypeA | TypeB

Returns

Record<string, (TypeA | TypeB)>