Skip to main content

forKnownDomain

Callable


  • Parses domain and asserts it is a domain the platform actually has, per DOMAINS. For a value fixed at build time -- a constant a client emits or compares against -- so that a typo, or a domain removed from the shape table, fails loudly rather than passing as an unvalidatable string.

    The loosened grammar is why this exists: a bare domain now parses, and the allowlist is the only thing that refuses a typo. Throws a plain Error if domain is malformed or names no domain in the shape table.


    Parameters

    • domain: string

    Returns EntityDomainReference