keywords

ArkEnv keywords that extend ArkType for common environment shapes.

Edit on GitHub

ArkEnv adds two env-oriented keywords on top of ArkType's keyword set. Use them in arkenv({ ... }) or type() from @arkenv/core.

ArkType only

Keywords work with @arkenv/core. @arkenv/standard has its own validator map.

string.host

An IP address (string.ip) or the literal "localhost".

import  from "@arkenv/core";

const  = ({
  : "string.host",
});
import {  } from "@arkenv/core";

const  = ("string.host");

type  = typeof .;

Prop

Type

An IP address (string.ip) or "localhost".

number.port

An integer port in the range 0-65535.

import  from "@arkenv/core";

const  = ({
  : "number.port",
});
import {  } from "@arkenv/core";

const  = ("number.port");

type  = typeof .;

Prop

Type

An integer port in the range 0-65535.

Everything else

Other primitives (string, number, boolean, enums, morphs) come from ArkType. See Defining types for common patterns.

Next steps