starRecord

tcmts.records.starRecord · #wq7gxylr · term · runs anywhere

A star record: author's library pkg (its key is starKey(author, pkg)).

import { STAR_COLLECTION } from "#codebase/tcmts/records";

export const starRecord = (
  author: string,
  pkg: string,
  createdAt: string = new Date().toISOString(),
): Record<string, unknown> => ({
  $type: STAR_COLLECTION,
  subject: { author, package: pkg },
  createdAt,
})

uses

used by