Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/effect/src/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,20 @@ export declare namespace TaggedEnum {
* ```
*
* @example
* ```ts
* import { Data } from "effect"
*
* type HttpError = Data.TaggedEnum<{
* BadRequest: { readonly status: 400; readonly message: string }
* NotFound: { readonly status: 404; readonly message: string }
* }>
*
* const { BadRequest, NotFound } = Data.taggedEnum<HttpError>()
*
* const notFound = NotFound({ status: 404, message: "Not Found" })
* ```
*
* @example
* import { Data } from "effect"
*
* type MyResult<E, A> = Data.TaggedEnum<{
Expand Down
Loading