Primitive
Combinators
getChoices
Added in v1.0.0
Source
Returns a text representation of the valid choices for a primitive type, if any.
Signature
declare const getChoices: <A>(self: Primitive<A>) => Option<string>Returns help documentation for a primitive type.
Signature
declare const getHelp: <A>(self: Primitive<A>) => SpangetTypeName
Added in v1.0.0
Source
Returns a string representation of the primitive type.
Signature
declare const getTypeName: <A>(self: Primitive<A>) => stringValidates that the specified value, if any, matches the specified primitive type.
Signature
declare const validate: { (value: Option<string>, config: CliConfig): <A>(self: Primitive<A>) => Effect<A, string, FileSystem>; <A>(self: Primitive<A>, value: Option<string>, config: CliConfig): Effect<A, string, FileSystem>;}Runs a wizard that will prompt the user for input matching the specified primitive type.
Signature
declare const wizard: { (help: HelpDoc): <A>(self: Primitive<A>) => Prompt<A>; <A>(self: Primitive<A>, help: HelpDoc): Prompt<A>;}Constructors
Represents a boolean value.
True values can be passed as one of: ["true", "1", "y", "yes" or "on"].
False value can be passed as one of: ["false", "o", "n", "no" or "off"].
Signature
declare const boolean: (defaultValue: Option<boolean>) => Primitive<boolean>Signature
declare const choice: <A>(alternatives: ReadonlyArray<[string, A]>) => Primitive<A>Represents a date in ISO-8601 format, such as 2007-12-03T10:15:30.
Signature
declare const date: Primitive<globalThis.Date>Represents a floating point number.
Signature
declare const float: Primitive<number>Represents an integer.
Signature
declare const integer: Primitive<number>Represents a user-defined piece of text.
Signature
declare const text: Primitive<string>Models
Other
Predicates
Symbol
PrimitiveTypeId
Added in v1.0.0
Source
Signature
declare const PrimitiveTypeId: unique symbolPrimitiveTypeId type
Added in v1.0.0
Source
Signature
type PrimitiveTypeId = typeof PrimitiveTypeId