Files
chat/src/data/guest.ts
T
zeekay 5dcce9026e Import within the package, not through an alias
The tilde resolves through the importing project's tsconfig, so a published
file asking for ~/data/types reads the consumer's source, not ours. A relative
path means the same thing in every project that installs this one.
2026-09-03 10:20:16 -07:00

20 lines
611 B
TypeScript

/**
* Who a visitor is before they sign in.
*
* Anonymous means anonymous: there is no account behind this and no credential
* in front of it. The value exists so the composer has a name to render and the
* shell has something to hold; the server never sees it and never trusts it.
* What a guest may do is decided there, from the absence of a bearer — which is
* also why becoming one cannot fail and asks nobody's permission.
*/
import type { User } from './types'
export const GUEST = 'guest'
export const guest = (): User => ({
id: GUEST,
role: GUEST,
username: GUEST,
name: 'Guest',
})