Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
docs(README): remove useless pipe imports from examples (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff authored Dec 25, 2023
1 parent 8bdc35c commit 0889af0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@ There are two ways to define a schema for a branded type, depending on whether y
To define a schema for a branded type from scratch, you can use the `brand` combinator exported by the `@effect/schema/Schema` module. Here's an example:

```ts
import { pipe } from "effect/Function";
import * as S from "@effect/schema/Schema";

const UserId = S.string.pipe(S.brand("UserId"));
Expand All @@ -1274,7 +1273,6 @@ type UserId = S.Schema.To<typeof UserId>; // string & Brand<"UserId">
Note that you can use `unique symbol`s as brands to ensure uniqueness across modules / packages:

```ts
import { pipe } from "effect/Function";
import * as S from "@effect/schema/Schema";

const UserIdBrand = Symbol.for("UserId");
Expand All @@ -1293,7 +1291,6 @@ import * as B from "effect/Brand";
type UserId = string & B.Brand<"UserId">;
const UserId = B.nominal<UserId>();

import { pipe } from "effect/Function";
import * as S from "@effect/schema/Schema";

// Define a schema for the branded type
Expand Down

0 comments on commit 0889af0

Please sign in to comment.