Skip to main content Link Search Menu Expand Document (external link)

Email overview

A module that implements a CVEmail brand, i.e. a string that represents a valid email. See the Effect documentation about Branding (https://effect.website/docs/code-style/branded-types/) if you are not familiar with this concept.


Table of contents


Constructors

fromString

Constructs an Either of an Email from a string.

Signature

export declare const fromString: MTypes.OneArgFunction<string, Either.Either<Type, Brand.Brand.BrandErrors>>

fromStringOption

Constructs an Option of an Email from a string.

Signature

export declare const fromStringOption: MTypes.OneArgFunction<string, Option.Option<Type>>

fromStringOrThrow

Constructs an Email if possible. Throws otherwise.

Signature

export declare const fromStringOrThrow: MTypes.OneArgFunction<string, Type>

unsafeFromString

Constructs an Email without any verifications

Signature

export declare const unsafeFromString: Brand.Brand.Constructor<Type>

Models

Type (type alias)

Email type

Signature

export type Type = Brand.Branded<string, _TypeId>

Module markers

TypeId

Module TypeId

Signature

export declare const TypeId: typeof TypeId

moduleTag

Module tag

Signature

export declare const moduleTag: "@parischap/conversions/Email/"