github arktypeio/arktype arktype@2.0.0-dev.18

latest releases: @arktype/util@0.49.0, @ark/util@0.49.0, @ark/type@2.1.22...
15 months ago

Add a "digits" keyword for strings consisting exclusively of 0-9.

Fix an issue causing index signatures with constraints like regex to be considered invalid as definitions.

The following is valid and now will be allowed as a definition.

const test = scope({
	svgPath: /^\.\/(\d|a|b|c|d|e|f)+(-(\d|a|b|c|d|e|f)+)*\.svg$/,
	svgMap: {
		"[svgPath]": "digits"
	}
}).export()

Don't miss a new arktype release

NewReleases is sending notifications on new releases.