DevTld

utils · /index·type

The concrete type of ParsedHost.tld when isDev is true. Reach for it when annotating a parameter or variable that must hold only a dev-environment TLD value — for example, a helper that constructs dev URLs or a type guard that narrows an unknown string to a known dev TLD.

Definition

@nordcom/commerce-utils
type DevTld = typeof DEV_TLDS[number];

typeof DEV_TLDS[number]

Example

function isDevTld(tld: string): tld is DevTld {
    return DEV_TLDS.includes(tld as DevTld);
}

ParsedHost AppName BuildEnv Hostname ShopHandle appFromHost isDevelopment isDevHost

Sourcehostname.ts:51Edit the JSDoc directly
Metadata@nordcom/commerce-utils@0.0.0Open in GitHub ↗

On this page