Cotal TypeScript packages
    Preparing search index...

    Function parseRecipient

    • Parse an explicitly typed recipient: #channel, @name-or-id, role:<role>. A bare word is not guessed. Returns the refusal text instead of throwing; pick names the front end's other way to choose one.

      Parameters

      • text: string
      • pick: string

      Returns { ok: true; recipient: Recipient } | { error: string; ok: false }