Primitives

String

Keywords

Literals

const literals = type({
	singleQuoted: "'typescript'",
	doubleQuoted: '"arktype"'
})

Patterns

Regex literals specify an unanchored regular expression that an input string must match.

They can either be string-embedded or refer directly to a RegExp instance.

const literals = type({
	stringEmbedded: "/^a.*z$/",
	regexLiteral: /^a.*z$/
})

Lengths

On this page