Skip to content

Commit 92a0816

Browse files
committed
remove effect adapters from more places
1 parent c8ebfc8 commit 92a0816

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,13 @@ import { describeMongo } from "./support/describe-mongo.js"
131131

132132
describeMongo("My tests", (ctx) => {
133133
test("find one", async () => {
134-
const program = Effect.gen(function* (_) {
135-
const db = yield* _(ctx.database)
134+
const program = Effect.gen(function*() {
135+
const db = yield* ctx.database
136136
const collection = Db.documentCollection(db, "find-one")
137137

138-
yield* _(
139-
DocumentCollection.insertMany(collection, [{ name: "john" }, { name: "alfred" }])
140-
)
138+
yield* DocumentCollection.insertMany(collection, [{ name: "john" }, { name: "alfred" }])
141139

142-
return yield* _(DocumentCollection.findOne(collection, { name: "john" }))
140+
return yield* DocumentCollection.findOne(collection, { name: "john" })
143141
})
144142

145143
const result = await Effect.runPromise(program)

packages/services/examples/layers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Todo = Schema.Struct({
1515

1616
const MyDb = DbService.Tag("MyDb")
1717

18-
const program = Effect.gen(function*(_) {
18+
const program = Effect.gen(function*() {
1919
const db = yield* MyDb
2020
const sourceCollection = Db.collection(db, "source", Todo)
2121
const destinationCollection = Db.collection(db, "destination", Todo)

packages/services/examples/multiple-mongodb-instances.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Todo = Schema.Struct({
1616
const MainDb = DbService.Tag("MainDb")
1717
const ReplicaDb = DbService.Tag("ReplicaDb")
1818

19-
const program = Effect.gen(function*(_) {
19+
const program = Effect.gen(function*() {
2020
const mainDb = yield* MainDb
2121
const newDb = yield* ReplicaDb
2222

packages/services/src/DbService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const layerEffect = <DbK extends string, MongoClientK extends string, E =
1919
clientTag: MongoClientService.TagType<MongoClientK>,
2020
dbName: Effect.Effect<string, E, R>
2121
) =>
22-
Effect.gen(function*(_) {
22+
Effect.gen(function*() {
2323
const dbname_ = yield* dbName
2424
return layer(dbTag, clientTag, dbname_)
2525
}).pipe(Layer.unwrapEffect)

packages/services/src/MongoClientService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const layerEffect = <MongoClientK extends string, E = never, R = never>(
1616
clientTag: TagType<MongoClientK>,
1717
url: Effect.Effect<string, E, R>
1818
) =>
19-
Effect.gen(function*(_) {
19+
Effect.gen(function*() {
2020
const url_ = yield* url
2121
return layer(clientTag, url_)
2222
}).pipe(Layer.unwrapEffect)

0 commit comments

Comments
 (0)