contributionOf

tcmts.store.contributionOf · #vr7egdtr · term · runs anywhere

import type { Contribution, Row } from "#codebase/tcmts/store";

export function contributionOf(r: Row): Contribution {
  return {
    id: r.id as number,
    title: r.title as string,
    description: r.description as string,
    source: r.source as string,
    target: r.target as string,
    author: r.author as string,
    status: r.status as Contribution["status"],
    created: r.created as number,
    updated: r.updated as number,
    mergedFrom: r.merged_from as string | null,
    mergedAs: r.merged_as as string | null,
  };
}

uses

used by