import type { Atom } from "../state-types.ts" export const INTERNAL_ROLES = [`tracker:signal`] as const export type InternalRole = (typeof INTERNAL_ROLES)[number] export function hasRole(atom: Atom, role: InternalRole): boolean { if (`internalRoles` in atom === false) { return false } return atom.internalRoles.includes(role) }