Skip to content

Commit d91512f

Browse files
committed
Collection: add type-level tests for rename
1 parent 8df7009 commit d91512f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/effect-mongodb/dtslint/Collection.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@ Collection.findOneAndReplace(collection, { birthday: "2024-11-28" }, myType)
8787

8888
// $ExpectType Effect<Option<{ readonly birthday: Date; }>, MongoError | ParseError, never>
8989
F.pipe(collection, Collection.findOneAndReplace({ birthday: "2024-11-28" }, myType))
90+
91+
// $ExpectType Effect<Collection<{ readonly birthday: Date; }, { readonly birthday: string; }, never>, MongoError, never>
92+
Collection.rename(collection, "new-collection")
93+
94+
// $ExpectType Effect<Collection<{ readonly birthday: Date; }, { readonly birthday: string; }, never>, MongoError, never>
95+
F.pipe(collection, Collection.rename("new-collection"))

0 commit comments

Comments
 (0)