Schema overview
An extension to the Effect.Schema module that adds Schema instances for number and date formatting and parsing and implements new brands
Table of contents
Instances
CVDateTime
A Schema that represents a CVDateTime
Signature
export declare const CVDateTime: Schema.Codec<CVDateTime.Type, CVDateTime.Type, never, never>
Utils
BigDecimalFromString
A Schema that transforms a string into a BigDecimal according to format. Read documentation of module NumberBase10Format.ts for more details
Signature
export declare const BigDecimalFromString: (
format: CVNumberBase10Format.Type
) => Schema.Codec<BigDecimal.BigDecimal, string>
CVDateTimeFromString
A Schema that transforms a string into a CVDateTime according to the given parser and formatter. Read documentation of modules DateTimeParser.ts and DateTimeFormatter.ts for more details.
Signature
export declare const CVDateTimeFromString: (
parser: CVDateTimeParser.Type,
formatter: CVDateTimeFormatter.Type
) => Schema.Codec<CVDateTime.Type, string>
DateFromCVDateTime
A Schema that transforms a CVDateTime into a Javascript Date. Upon encoding, the CVDateTime object is created with the default timeZoneOffset of the machine this code is running on
Signature
export declare const DateFromCVDateTime: Schema.Codec<Date, CVDateTime.Type, never, never>
DateFromString
A Schema that transforms a string into a Javascript Date according to the given parser and formatter. Read documentation of modules DateTimeParser.ts and DateTimeFormatter.ts for more details.
Signature
export declare const DateFromString: (
parser: CVDateTimeParser.Type,
formatter: CVDateTimeFormatter.Type
) => Schema.Codec<Date, string>
DateTimeZonedFromCVDateTime
A Schema that transforms a CVDateTime into an Effect.DateTime.Zoned. Both objects share the same time zone offset
Signature
export declare const DateTimeZonedFromCVDateTime: Schema.Codec<DateTime.Zoned, CVDateTime.Type, never, never>
DateTimeZonedFromString
A Schema that transforms a string into an Effect.DateTime.Zoned according to the given parser and formatter. Read documentation of modules DateTimeParser.ts and DateTimeFormatter.ts for more details.
Signature
export declare const DateTimeZonedFromString: (
parser: CVDateTimeParser.Type,
formatter: CVDateTimeFormatter.Type
) => Schema.Codec<DateTime.Zoned, string>
FiniteFromString
A Schema that transforms a string into a number according to the format. Read documentation of module NumberBase10Format.ts for more details
Signature
export declare const FiniteFromString: (format: CVNumberBase10Format.Type) => Schema.Codec<number, string>
Template
A Schema that transforms a string into an object according to template. Read documentation of module Template.ts for more details
Signature
export declare const Template: <PlaceholderTypes extends MTypes.Object>(
template: CVTemplate.Type<PlaceholderTypes>
) => Schema.Codec<PlaceholderTypes, string>