Option

data class Option(val inner: Type) : Type

An option type (nullability). Allows for nested nullability.

Constructors

Link copied to clipboard
constructor(inner: Type)

Properties

Link copied to clipboard
val inner: Type
Link copied to clipboard
open override val kind: String

Functions

Link copied to clipboard
infix fun Type.accepts(v: Value): Boolean

Convenience method to check a value against a type with no named declarations, ignoring the specifications of mismatches.

fun Type.accepts(v: Value, schema: Schema): Boolean

Convenience method to check a value against a type, ignoring the specifications of mismatches.

Link copied to clipboard
infix fun Type.check(v: Value): List<Mismatch>

Check a value against a type with no named declarations to resolve against.

fun Type.check(v: Value, schema: Schema): List<Mismatch>

Check a value against a type, resolving any Type.Ref through schema.

Link copied to clipboard